In the IOS8 system, collection of different APP development and problems encountered, ios8app
Example: after the official version of IOS8 was released, there were many projects and various problems occurred.
As Apple officially said, IOS8 will change a lot for developers.
Here is a collection, and only a few are available at present. Record:
1. UITableviewCell
Memory continues to increase. For a long time. Later, I found the following problems step by step:
-(Void) layoutSubviews
Previously, after accessoryView is set for IOS7, contentView is moved forward. In this method
[Super layoutSubviews]; // starts with IOS8, which may cause loops. Therefore, only if (need) {CGRect frmContentview = self. contentView. frame; frmContentview. size. width = CGRectGetWidth (self. bounds); self. contentView. frame = frmContentview ;}
So many places that use this will cause infinite loops. Because the frame of contentView is changed, the layoutSubviews method will be continuously caused.
Solution: Use self. contentView. superView. And
- (void)setSelected:(BOOL)selected animated:(BOOL)animated{ [super setSelected:selected animated:animated]; [self.contentView.superView setBackgroundColor:self.contentView.backgroundColor]; // Configure the view for the selected state}- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated{ [super setHighlighted:highlighted animated:animated]; [self.contentView.superView setBackgroundColor:self.contentView.backgroundColor];}
In this way, the colors are unified. Other functions can be used normally.
2. NSUserDefaults
This is really a pain point. Clean Project, delete the simulator APP. After re-running,
It is found that the obtained BOOL value or all other values are basically the same as those when they are not deleted. Google finally found the iOS 8 simulator. If the app is deleted, it seems that NSUserDefaults will not be reset.
Therefore, you only need to reset the simulator. After the retry, we found that this was the case. The real machine has not been tested.
3. keyboard.
Both textField and textView can see that the cursor is beating. However, the keyboard cannot be used.
I have struggled for more than an hour. I have been searching for various reasons for google for a long time. At last, after resetting at, it is found that it is back to normal. Instant speechless
4. UIAlertView
UIAlertView if the title is set to nil. The font turns black. Set it @ ".
5. duplicate names
A new class is inherited from NSObject. A delegate protocol is declared.
Result: NSFileManagerDelegate is found during use.
This is because the NSObject class has a delegate statement in the IOS8 SDK. Rename the name.
6. UIScrollview
Many people have encountered the problem that UIScrollview cannot slide when IOS6 is upgraded to IOS7. This is the way on the Internet.
Add it to viewWillAppear or viewDidAppear,
[Self. tableview setContentOffset: CGPointMake (0, CGFLOAT_MAX) animated: YES];
However, in IOS8, this kind of behavior can also lead to death.
Therefore, you can use the following methods to solve the problem:
if (self.tableview.contentSize.height > self.tableview.bounds.size.height) { [self.tableview setContentOffset:CGPointMake(0, self.tableview.contentSize.height) animated:YES]; }
7. BadgeNumber
When updating the APP logo, authorization is required in ios8. otherwise, an error may occur. Or prompt
Attempting to badge the application icon but haven't stored ed permission from the user to badge the application
#ifdef SUPPORT_IOS8 if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) { UIUserNotificationType myTypes = UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound; UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:myTypes categories:nil]; [[UIApplication sharedApplication] registerUserNotificationSettings:settings]; }else#endif { UIRemoteNotificationType myTypes = UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeSound; [[UIApplication sharedApplication] registerForRemoteNotificationTypes:myTypes]; }
SUPPORT-IOS8
_ IPHONE_ OS _VERSION_MIN_REQUIRED >=80000
========================================================== ===== Other requests are supplemented slowly ==================================== ======================
Here is a post about iOS 8 changes. You can take a look:
Http://www.cocoachina.com/bbs/read.php? Tid-217107.html
Is the app store of the Ios8 system unstable only for 4s or all models? The probability that app store cannot be used is high.
I look like a fruit system, which is difficult! I have never used a fruit system for a long time. I remember that the fruit system has a repair system function (which does not affect the software I installed). It seems that I want to provide a system CD and extract the core files for restoration, you can find it in the system utility!
The ios8 system has been upgraded, and there is nothing in the App. Why? How can this problem be solved,
Hi, don't worry. The system is unstable after the upgrade. My iPad4 upgrade is the same as what you said, no screen, no application can be found, and I have also made the upgrade before. It's okay to shut down and restart it. After Entering the appstore, see, hope to help you