ios8.1

becomeFirstResponder not working in iOS 8

梦想与她 提交于 2019-11-28 07:32:19
I am using UITextField's method becomeFirstResponder to show the keyboard. This is working in iOS 7. But in iOS 8 this method doesn't show the keyboard. UITextField *txtAddNew = [[UITextField alloc] initWithFrame:CGRectMake(10,10,240, 21)]; txtAddNew.font = [UIFont fontWithName:@"Helvetica" size:16]; txtAddNew.clearButtonMode = UITextFieldViewModeWhileEditing; txtAddNew.returnKeyType = UIReturnKeyDone; txtAddNew.delegate = self; txtAddNew.autocorrectionType = UITextAutocorrectionTypeNo; txtAddNew.tag = 15; // Open keyboard [txtAddNew becomeFirstResponder]; Is there any way to do it in iOS 8?

invalid redeclaration in auto code generate NSManagedObject Subclass Swift 3

瘦欲@ 提交于 2019-11-28 06:09:23
Using Version 8.1 of Xcode. Create an entity named "MapRegionObject" in .xcdatamodeld file. Using auto code generator, click Editor on the navigation bar -> create NSManagedOject Subclass... Got two files : MapRegionObject+CoreDataClass.swift and MapRegionObject+CoreDataProperties Errors in two files showing in the screenshot: MapRegionObject+CoreDataClass.swift MapRegionObject+CoreDataProperties Please help me fix this bugs, thank you so much! Kamillpg In Xcode 8.1, before using the auto code generator, you must select the entity in your data model: Then go to the Data Model Inspector tab:

NSLocale preferredLanguages objectAtIndex:0 always return “en”

♀尐吖头ヾ 提交于 2019-11-27 14:28:15
问题 Simulator's language already changed to Japanese, why [[NSLocale preferredLanguages] objectAtIndex:0] always return "en" ? Neither preferred language nor region is related to "en", where does "en" come from? Tried to get [[NSLocale preferredLanguages] objectAtIndex: 2 ] , then crash shows *** Terminating app due to uncaught exception 'NSRangeException', reason: '-[__NSCFArray objectAtIndex:]: index (2) beyond bounds (1) Does it means there is no any languages are set in simulator? So weird!

Changing language on iOS 8.1 simulator does not work

醉酒当歌 提交于 2019-11-27 10:24:41
问题 If I change the language on an iOS 8.1 simulator to anything and try to detect this from code with NSString * language = [[NSLocale preferredLanguages] objectAtIndex:0]; NSLog(@"Language: %@", language); I get "en" back. I've tried resetting the navigator, etc. I've tried this using the iOS 7.1 runtime (in Xcode 5.1.1), and it worked fine. Has anyone managed to find a workaround to this problem? 回答1: According to the release notes this is a known issue. There is a work around. If you go to

Transparent background for modally presented viewcontroller

自作多情 提交于 2019-11-27 03:55:15
I am using Parse & ParseUI. I want my PFLoginViewController subclass to have a transparent background. In the future, I want to lay a blurred view over the background. But.... Once the animate-in of the PFLoginViewController is done, the background turns black... Whilst during the animation the background was transparent. func presentLogin() { var loginViewController = LoginViewController() var signupViewController = SignUpViewController() loginViewController.fields = .UsernameAndPassword | .LogInButton | .PasswordForgotten | .SignUpButton | PFLogInFields.DismissButton signupViewController

becomeFirstResponder not working in iOS 8

China☆狼群 提交于 2019-11-27 01:50:47
问题 I am using UITextField's method becomeFirstResponder to show the keyboard. This is working in iOS 7. But in iOS 8 this method doesn't show the keyboard. UITextField *txtAddNew = [[UITextField alloc] initWithFrame:CGRectMake(10,10,240, 21)]; txtAddNew.font = [UIFont fontWithName:@"Helvetica" size:16]; txtAddNew.clearButtonMode = UITextFieldViewModeWhileEditing; txtAddNew.returnKeyType = UIReturnKeyDone; txtAddNew.delegate = self; txtAddNew.autocorrectionType = UITextAutocorrectionTypeNo;