2012-02-16 34 views
0

您好,我正嘗試使用Three20與我的Monotouch應用程序沒有運氣。 我已經添加了Three20 dll文件,我made和所有創建的* .a文件,我的項目。 我已經在我的項目選項中添加了參數,並且所有編譯的魔女都意味着我以正確的方式完成了這部分。使用Three20與Monotouch.Dialog時崩潰同時使用

-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

任何想法?

回答

1

您正在將TTTabBar的tabItems屬性設置爲NSString的數組,如果它應該是TTTabItem對象的數組。

+0

你能給我一個簡單的例子嗎? – Janub 2012-02-16 09:59:24

+0

將其更改爲TTtabItem NSArray後仍然無法正常工作 – Janub 2012-02-16 10:52:01