ios7

Cryptic warning without any google results [In Simulator]

不羁岁月 提交于 2019-12-12 09:33:45
问题 I get this warning in my iOS project: (iOS7, XCode 5 GM) Warning: Unable to create restoration in progress marker file I am working on a viewcontroller that turns all black when I get this warning on startup. Deleting the app and restarting XCode sometimes seems to help. I am returning NO on both -(BOOL)application:(UIApplication *)application shouldRestoreApplicationState: -(BOOL)application:(UIApplication *)application shouldSaveApplicationState: Update1: I tested on iPhone4s. Same result.

iPhone string comparison strange issue in iOS 6

流过昼夜 提交于 2019-12-12 09:18:27
问题 I used to compare the text entered in a txt field as below, if ([myTextfield.text isEqualToString: @""]) { // success code } else { // my code } in iOS 7 this check works perfectly. If nothing entered in to the text field, condition is success. But in iOS 6 if the field is blank, this condition always false and moves to the else block. So i did like, if (myTextfield.text.length == 0) { // success code } else { // my code } This works fine, and I just wanted to know what is wrong in my first

Delegate to know when phone call ends which was initiated by app

不想你离开。 提交于 2019-12-12 09:00:08
问题 I have a code which places a phone call using below code : // Make a call to given phone number - (void)callPhoneNumber:(NSString *)phoneNumber { if (!self.webview) self.webview = [[UIWebView alloc] init]; self.webview.delegate = self; // Remove non-digits from phone number phoneNumber = [[phoneNumber componentsSeparatedByCharactersInSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]] componentsJoinedByString:@""]; // Make a call NSURL * url = [NSURL URLWithString:[NSString

CoreData migration in iOS 7

a 夏天 提交于 2019-12-12 08:57:57
问题 Finally got this migration working, it was a big pain. source code Everything works fine in iOS6 but in iOS7 app crash 回答1: Based on your comment and a bug report at http://openradar.io/15555487 I'm guessing that the full message is something like: CoreData: error: failure reading metadata plist with data bytes: <33> Unable to open database. Error: The file couldn’t be opened because it isn’t in the correct format. Info: { NSUnderlyingException = "An error <null> occurred converting the

Issues with UITableViewCellSeperator reappearing after popping from the stack

做~自己de王妃 提交于 2019-12-12 08:57:13
问题 I have an application with dynamic data loaded into a tableview. When there is only one item (thus only one cell). To make sure that the UITableViewCellSeperator is not showing up for this one item I am using this code: - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { // This will create a "invisible" footer return 0.01f; } This works as expected and here is what my cell looks like: As you can see this works as expected and there is no cell separator

Merge video files with their original audio in iOS

风流意气都作罢 提交于 2019-12-12 08:56:30
问题 I need to merge two video files along with their corresponding audio. I tried using : http://www.raywenderlich.com/13418/how-to-play-record-edit-videos-in-ios The videos gets merged, but their audio is missing. It's like a muted video. I need the audio also to be merged. I also googled on this, couldn't find anything useful. Can someone help me on this please... 回答1: Live-editing audio is exactly like live-editing video. Go back to each movie and fetch the audio track and stick it into your

UICollectionView crashes randomly because of highlighting issue

扶醉桌前 提交于 2019-12-12 08:55:10
问题 I have a UICollectionView on iOS7 which crashes randomly when intense scrolling. I enabled zombies and found that it gives me an error saying: *** -[NSIndexPath section]: message sent to deallocated instance 0x17dbc970 I believe this is due to an Apple error described here. Apparently, the app crashes when someone highlights a cell while scrolling fast, and then the OS tries to unhighlight it when it moves off screen, when it ceases to exist. The proposed solution is to disable the

Looking for an MKOverlayPathRenderer example

半腔热情 提交于 2019-12-12 08:46:41
问题 I am trying to figure out how to use a new MKOverlayPathRenderer class. In my app I previously used MKOverlayPathView when building with iOS 6 SDK, but it does not seem to work with iOS 7 SDK unfortunately. So I am trying to move my app from MKOverlayPathView to MKOverlayPathRenderer , but have no success so far. MKPolylineRenderer works OK, but MKOverlayPathRenderer does not. The code gets called, but no overlay is drawn on a map. Does anybody have a working example for MKOverlayPathRenderer

how to get Custom UIPickerView

爱⌒轻易说出口 提交于 2019-12-12 08:38:32
问题 Hey Guys Please help me i want to achieve the following functionality in Custom UIPiker As shown in below Picture. I want to change the text colour of selected area only like above 回答1: Add lable in your pickerview in your viewDidLoad method as below. Define label and myPickerView both in ViewController.h file - (void)viewDidLoad { myPickerView = [[UIPickerView alloc] initWithFrame:CGRectMake(0, 200, 320, 200)]; myPickerView.delegate = self; myPickerView.showsSelectionIndicator = YES; [self

NSAttributedString reporting incorrect sizes for UITextView sizeThatFits and boundingRectWithSize with correct options set

╄→гoц情女王★ 提交于 2019-12-12 08:38:04
问题 I have an NSAttributedString that is reporting a boundingRectWithSize (and by extension a UITextView which improperly calculates its sizeThatFits) when the font size is decreased from the font size that was used to create it. It doesn't happen on all NSAttributedStrings for which I do similar operations, so here's the steps to reproduce. Use a non-standard font that does not include the full unicode character set. Make sure the string includes characters in this "unsupported" set. iOS will