I'm making an iPhone app with a login facility. After logging in, I have written it in the database. When the user opens the app, I want to know whether to go to the app or not, or show a UIView for them to login. I have some code, but it crashes here:
- (zero) applicationdeffish: Launching: (UI application *) app {sleep (5); // Configure and Show Window [Add WindowSubview: [Navigation Controller View]]; [Window-making and knowledgeable]; // [app set: Starts Bars Style: Uitatus Bars Style Blake Opaque]; Int Check Login Quote = 0; NSArray * checkLoginInfo = [database executeQuery: @ "Log In Selection * where id! = '' Or email! = '' Or password! = ''"];]; (NSDictionary * checkLoginRow checkLoginInfo) {checkLoginCount ++; } NSLog (@ "Alsfuffled Foxjeels de FJcas% D", check logiccards); If (CheckOgnCount == 0) {SplashPageVient Controller * Scravveno = [[SplashPage Vuii Controller Alok] Init Whitneynam: @ "SplashPage" Bundle: Nile]; // NSLog (@ "Eldjacksfasdfjdxdfxsdlx FJ% @", Scentwave); Screentwo.modalTransitionStyle = UIModalTransitionStyleCoverVertical; [Self-Present Model View Controller: Scanner Two Animated: No]; [Screwdro release]; } Else {splashView = [[UIImageView alloc] initWithFrame: CGRectMake (0,0, 320, 480)]; SplashView.image = [UIImage imageNamed: @ "Default.png"]; [Add window sbewview: splashview]; [Window LaosVivio Toufrant: Splashview]; [UIView startup permissions: zero reference: zero]; [UIView Set Animation Duration: 0.5]; [UIView Set Animation Transition: UIViewAnimationTransitionNone forView: Window Cache: Yes]; [UIView Set Delegate Animation: self]; [UIView Set AnimationDidstopsChill: @Selector (startup animation don: expired: reference :)]; SplashView.alpha = 0.0; //splashView.frame = CGRectMake (-60, -60, 440, 600); [UIView commitAnimations]; }} And here is the error:
- [TableviewViric current model view controller: animated]]: 0x4e3e860 table for example sent to unknown selector View [1530 9: 207] * ** Unacceptable Exception 'Cancellation of App due to NSINIDAD Agreement', reason: '[Tablevic equivalent current model view controller: animated]]: 0x4e3e860' *** sent to unrecognized selector for example Throw the call stack first In: (0 core Fundeshn 0x00fccbe 9 __exceptionPreprocess + 185 1 libobjc A.dylib 0x011215c2 objc_exception_throw + 47 2 CoreFoundation 0x00fce6fb - [NSObject (NSObject) doesNotRecognizeSelector:] 187 3 CoreFoundation 0x00f3e366 ___forwarding___ + 966 4 CoreFoundation 0x00f3df22 _CF_forwarding_prep_0 + 50 5 tableview 0x00002b02 - [ TableViewAppDelegate applicationDidFinishLaunching:] + 473 6 UIKit 0x002e6253 - [UIApplication _callInitializationDelegatesForURL: Payload: Suspended:] + 1252 7 UIKit 0x002e855e - [UIApplication _runWithURL: Payload: Launch Orientation: Status BarStyle: StatusBarHid Due:] 439 8 UIKit 0x002f2db2 - [UIApplication handleEvent: WithNewEvent: 1533 9 UIKit 0x002eb202 - [UIApplication sendEvent:] 71 10 UIKit 0x002f0732 _UIApplicationHandleEvent + 7576 11 GraphicsServices 0x0186fa36 PurpleEventCallback + 1550 12 CoreFoundation 0x00fae064 __CFRUNLOOP_IS_CALLING_OUT_ TO_A_SOURCE1_PERFORM_FUNCTION__ + 52 13 CoreFoundation 0x00f0e6f7 __CFRunLoopDoSource1 + 215 14 CoreFoundation 0x00f0b983 __CFRunLoopRun + 979 15 CoreFoundation 0x00f0b240 CFRunLoopRunSpecific + 208 16 CoreFoundation 0x00f0b161 CFRunLoopRunInMode + 97 17 UIKit 0x002e7fa8 - [UIApplication _run] 636 18 UIKit 0x002f442e UIApplicationMain + 1160 19 tableview 0x000027f6 Main + 84 20 tableview 0x00002799 start + 53 21 ??? Take that action in that method who knows. Any help is appreciated! Callton!
first sleep (5); is a bad idea, you should refrain from using sleep on the main thread (and better do not use it anywhere). It seems that you have your code in a file (main app representative) and also a table view representative? Thats why you have so dirty code, try to break the argument into two groups.
For example, you can show your model view with the help of the Navigation Controller: <<> [[Auto Navigation Controller] Current Model View Controller: Animated Models View Controller: Yes]; and
[dismiss self.navigationController Model view controller permission: Yes]; In iOS, you can display the controller visually by presenting it for your model view with your current view controller. So you get any preloaded view controllers.
Comments
Post a Comment