ios7

NSXMLParser parser:parseErrorOccurred: not called on iOS 7

南楼画角 提交于 2019-12-13 15:42:25
问题 I have a very strange issue on iOS7. I use standard NSXMLParser. On iOS6 everything works just fine - when XML is valid as well as when NSData is zero bytes or contains invalid bytes. self.dataParser = [[[NSXMLParser alloc] initWithData:data] autorelease]; [self.dataParser setDelegate: self]; [self.dataParser parse]; On iOS7 parser works as expected only when it has a valid XML data. If data is zero bytes, none of the delegate methods are called. Please help me find a direction to look to.

iOS 7 custom fonts alignment

烂漫一生 提交于 2019-12-13 14:47:03
问题 I've used a custom TTF font (Gotham) when implementing the layout of an app on iOS 6. I've noticed its baseline was always a bit higher than regular fonts, but just nudged things around to fit. Now that I've updated to the iOS 7 SDK, the font placement is closer to that of regular fonts when running on iOS 7 devices, but still looks nudged on iOS 6 devices. So it looks like Apple fixed what caused that vertical shifting on the baseline when interpreting the font metrics for iOS 7, but left

Xamarin.iOS Target iOS 6 SDK

放肆的年华 提交于 2019-12-13 14:33:32
问题 We have upgraded to XCode 5 and Xamarin.iOS 7.x, but have one app we are not quite ready to support iOS 7 for yet. Is there a way to target the iOS 6.0 SDK, and compile the app so that it has the old iOS 6 keyboard, etc.? We tried changing the settings in iOS Build->SDK Version, and we can change it when targeting the simulator, but the option doesn't exist for AhHoc or AppStore builds. Any ideas? 回答1: Xcode ships with several simulator SDK but only one device SDK. So you need to install an

Getting pixel data on iOS 8 / iPhone 6

大城市里の小女人 提交于 2019-12-13 14:13:29
问题 I need to retrieve the pixel data for a given (x, y) coordinate of a bitmap image. For years my code has been as follows: _palettePixelData = CGDataProviderCopyData(CGImageGetDataProvider(image.CGImage)); const UInt8 *rawData = CFDataGetBytePtr(_imagePixelData); int pixelInfo = ((image.size.width * floorf(pointInImage.y) * image.scale) + floorf(pointInImage.x) * image.scale ) * 4; CGFloat red = rawData[pixelInfo + 0] / 255.0; CGFloat green = rawData[pixelInfo + 1] / 255.0; CGFloat blue =

Could not instantiate class named GLKView

痴心易碎 提交于 2019-12-13 14:08:02
问题 I got this exception: 2014-02-19 19:08:34.590 MyApp[42353:70b] *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named GLKView' It is because I tried to add a GL view to my xib file this way: What I want to achieve is to draw gradient background beneath the View (the one with Label 'City') It is probably a commonly-seen exception because any more experienced iOS developers can tell I have no clue what I am doing. My

iOS 7 modal view makes buttons grey (disabled)

倾然丶 夕夏残阳落幕 提交于 2019-12-13 13:41:25
问题 I'm upgrading an app to iOS 7 and am running into a problem where all buttons turn to grey after I display a modal view. They're still clickable though. It only happens with modal views and not popovers. 回答1: As @CarmeloS points out the tint color is most likely your problem. Look at UIAppearance and or another view/viewcontroller higher up in the view heirachy as I believe this is now an inherited trait. So you may have set it it elsewhere. 回答2: Maybe it's the tintColor attribute, try

UIAlertView makes the program crash

故事扮演 提交于 2019-12-13 13:14:04
问题 I've got a crash: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIKeyboardTaskQueue performTask:] may only be called from the main thread.' And I could not find a solution for 2 days. And here is the code: [alert dismissWithClickedButtonIndex:0 animated:YES]; UIAlertView *noTicketAlert = [[UIAlertView alloc] initWithTitle:@"Aradığınız kriterlere uygun bilet bulunamadı!" message:nil delegate:self cancelButtonTitle:@"Tamam" otherButtonTitles: nil];

UINavigationBar change title text color and font size

家住魔仙堡 提交于 2019-12-13 13:11:16
问题 I want to change navigation title's font and color..so, for that i've done this below code..but its not working... if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7")) { NSDictionary *navbarTitleTextAttributes = [NSDictionary dictionaryWithObjectsAndKeys: [UIColor whiteColor], NSForegroundColorAttributeName, [UIFont fontWithName:@"MyFavoriteFont" size:20.0], NSFontAttributeName, nil]; [[UINavigationBar appearance] setTitleTextAttributes:navbarTitleTextAttributes]; NSLog(@"setTitleTextAttributes

Finding out what song is playing in Music.app

拟墨画扇 提交于 2019-12-13 12:34:56
问题 On iOS, is there a way for my application to find out what song is currently playing in the Music application? For example, if they are playing a song in the background while using my app, can I get information on that song? And if I can, is there a way for my app to receive some sort of notification when a new song begins playing? Thanks! 回答1: It is possible to get some information as such: (There's many other MPMediaItemProperties too) As far as your 2nd question within the question, I do

iOS 7 Navigationbar background image issue

╄→гoц情女王★ 提交于 2019-12-13 12:12:59
问题 I am using Image as Navigation bar background Image. To set Image I used following code: [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"nav_logo_ios7.png"] forBarMetrics:UIBarMetricsDefault]; For iOS7 "nav_logo_ios7.png" image size is 768x64 and for iOS6 and bellow I used image has size 768x44. This is working well on all UIViewControllers . In same project I am using UIActivityViewController . On iOS7 mail compose view look like this: How I can handle this? Thanks in