0

您好,我正在尝试将Three20与我的Monotouch应用程序一起使用,但没有成功。我已将我制作的Three20 dll 文件和创建的所有 *.a 文件添加到我的项目中。我在我的项目选项中添加了参数,并且所有内容都已编译,这意味着我以正确的方式完成了该部分。

-gcc_flags "-framework QuartzCore -L${ProjectDir}} -|libThree20CoreSDK -|libThree20NetworkSDK -|libThree20SDK -|libThree20StyleSDK -|libThree20UICommonSDK -|libThree20UINavigatorSDK -|libThree20UISDK -ObjC"

我创建了一个测试视图:

public partial class ViewForTesting : DialogViewController
{

    public ViewForTesting () : base (UITableViewStyle.Grouped, null)
    {
        Section section = new Section();
        TTTabBar strip = new TTTabBar(new RectangleF(0,0,200,40));

        NSMutableArray arr = new NSMutableArray();
        NSString a = new NSString("abc");
        arr.Add(a);
        arr.Add(a);
        strip.TabItems = arr;       

        section.HeaderView = srtip;

        root.Add(section);
        this.Root = root;
    }
}

这是我得到的错误

  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:
0   Test                                0x00090b7c mono_handle_native_sigsegv + 284
1   Test                                0x00005f28 mono_sigsegv_signal_handler + 248
2   libsystem_c.dylib                   0x9bbcb59b _sigtramp + 43
3   ???                                 0xffffffff 0x0 + 4294967295
4   ???                                 0x1162086c 0x0 + 291637356
5   ???                                 0x11620158 0x0 + 291635544
6   ???                                 0x0b5beb5b 0x0 + 190573403
7   ???                                 0x0b5ba3a0 0x0 + 190555040
8   ???                                 0x0b5ba4bf 0x0 + 190555327
9   Test                                0x0000a292 mono_jit_runtime_invoke + 722
10  Test                                0x0016a17e mono_runtime_invoke + 126
11  Test                                0x0020683c monotouch_trampoline + 3372
12  UIKit                               0x0218e9d6 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1292
13  UIKit                               0x0218f8a6 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 508
14  UIKit                               0x0219e743 -[UIApplication handleEvent:withNewEvent:] + 1027
15  UIKit                               0x0219f1f8 -[UIApplication sendEvent:] + 68
16  UIKit                               0x02192aa9 _UIApplicationHandleEvent + 8196
17  GraphicsServices                    0x0478afa9 PurpleEventCallback + 1274
18  CoreFoundation                      0x011951c5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
19  CoreFoundation                      0x010fa022 __CFRunLoopDoSource1 + 146
20  CoreFoundation                      0x010f890a __CFRunLoopRun + 2218
21  CoreFoundation                      0x010f7db4 CFRunLoopRunSpecific + 212
22  CoreFoundation                      0x010f7ccb CFRunLoopRunInMode + 123
23  UIKit                               0x0218f2a7 -[UIApplication _run] + 576
24  UIKit                               0x02190a9b UIApplicationMain + 1175
25  ???                                 0x0b5b779c 0x0 + 190543772
26  ???                                 0x0b5b6980 0x0 + 190540160
27  ???                                 0x0b5b6818 0x0 + 190539800
28  ???                                 0x0b5b68a7 0x0 + 190539943
29  Test                                0x0000a292 mono_jit_runtime_invoke + 722
30  Test                                0x0016a17e mono_runtime_invoke + 126
31  Test                                0x0016e264 mono_runtime_exec_main + 420
32  Test                                0x00173685 mono_runtime_run_main + 725
33  Test                                0x00067495 mono_jit_exec + 149
34  Test                                0x002116c9 main + 2825
35  Test                                0x000032e5 start + 53

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

我也将 monoTouch 更新到 5.2.4

任何想法?

4

1 回答 1

1

您正在将 TTTabBar 的 tabItems 属性设置为 NSStrings 数组,它应该是 TTTabItem 对象数组。

于 2012-02-16T09:39:51.963 回答