ios7

status bar is overlapping with the view in iOS7

扶醉桌前 提交于 2019-12-24 02:33:32
问题 status bar is overlapping with the view How do I set the view below the status bar in iOS7 I'm using XIB not a storyboard 回答1: In iOS 7.0, UI statusbar is transparent, To accommodate the changes in the app as with the status bar style you can use: UIStatusBarStyleDefault for Status bar to be dark while for light content use UIStatusBarStyleLightContent If facing trouble with background image of View in app where the image is extending itself behind the status bar. Set the image in nib or

Can't seem to calculate correct line-height of NSAttributedString for a UILabel

不打扰是莪最后的温柔 提交于 2019-12-24 01:39:20
问题 I'm using NSAttributedString's boundingRectWithSize:options:context: method to calculate the expected height for some text, after reading this article from objc.io +(CGSize)postLabelSizeForPost:(ANKPost *)post { CGFloat labelWidth = 220.0f; NSAttributedString *text = [BXTPostCell mutableAttributedStringForPost:post]; NSStringDrawingOptions options = NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading; CGRect boundingRect = [text boundingRectWithSize:CGSizeMake(labelWidth,

Xcode 5 “Missing compiler spec LLVM 4.2” error

不想你离开。 提交于 2019-12-24 01:37:23
问题 I am currently trying to build my project in Xcode 5. Build fails with error: Dependency Analysis Error: missing compiler specification <XCCompilerSpecification: Some memory address here :'com.apple.compilers.llvmgcc42':MISSING:Default> for file for all code files in project. The project used to be built in Xcode 4.6 with LLVM 4.2 and now Xcode 5 only supports LLVM 5. So there is obviously something related to that here. I have set the build settings in Xcode 5 to use LLVM 5 and the build

iOS Facebook SDK “user cancelled login” when running app on device?

北战南征 提交于 2019-12-24 01:24:34
问题 I'm using the latest iOS Facebook SDK and I can log in and out perfectly when I am running my app in the simulator (in which case it opens the non-native popup window because the facebook app is not installed), but when I run it on my device I get the native uialertview popup and when I click "ok", the terminal says "user cancelled login" and the popup dismisses but it doesn't log in. Do you have any idea what could be causing this? I have done some research and couldn't find anything. I have

iOS7 xCode5 how to resolve “invalid product ID” for in app purchases in 2014?

。_饼干妹妹 提交于 2019-12-24 01:13:24
问题 I'm trying to implement in-app purchases in one of my apps, and have an issue where I get no products returned when I send a product request for sandbox testing. I see a lot of very old posts, like this one (invalid product id from 2010). What am I doing wrong with my in app purchase setup? Is there any recent tutorials on how to configure xCode5 to use in app purchasing? - (void)requestProUpgradeProductData { NSSet *productIdentifiers = [NSSet setWithObject:self.productID ]; productsRequest

Difficulties understanding MapKit Coordinate System

梦想的初衷 提交于 2019-12-24 00:55:37
问题 I read the apple docs "A map point is an x and y value on the Mercator map projection" A point is a graphical unit associated with the coordinate system of a UIView What is the difference logically between a Point and a MKPoint? I obviously need CGPoint to display something on the screen. So why does MapKit need MKMapPoint? 回答1: The fact that both the CGPoint and MKMapPoint structs happen to store two floating-point values named x and y is irrelevant. They are given different names because

Conditionally compiling for differences in libxml2 in iOS 7

一世执手 提交于 2019-12-23 21:44:44
问题 When using iOS 7 SDK, due to changes in libxml2 I had to change a single line of a library to use the new output buffer accessor methods for the xmloutput buffer. NSData * result = [[[NSData alloc] initWithBytes:outputBuffer->buffer->content length:outputBuffer->buffer->use] autorelease]; Resulted in compile error 'Incomplete definition of type struct_xmlBuf'. Using the new accessor methods this became: NSData * result = [[NSData alloc] initWithBytes:xmlOutputBufferGetContent(outputBuffer)

IOs7 multiple storyboard localization issue

南笙酒味 提交于 2019-12-23 20:38:17
问题 I use several storyboards and I have just decided to localize them (.strings files have been generated by Xcode). I notice that in the Build Phases > Copy Bundle Resources, all resources related to localization appear in red. At run time, localization works only on the main storyboard. Localization with Localizable.strings also works. But it doesn't on the other storyboards. I tried to restart Xcode but it didn't change anything. (cf Base internationalization and multiple storyboard not

how to lock portrait orientation for only view in ios 7

痞子三分冷 提交于 2019-12-23 20:35:44
问题 I have created an application for Iphone and Ipad that is composed from two main views with navigation controller. The navigation controllers are inserted into tabBar controller. I would like lock the main views to Portrait orientation and only a subview of a navigation controller trigger the possibility orintation to Partrait and Landscape. Is it possible? How Can I do? Thanks 回答1: Both answers given so far are wrong. Here's what you do: Make sure you list portrait and landscape in the list

Instruments reporting memory leak whenever AVSpeechSynthesizer is used to read text

送分小仙女□ 提交于 2019-12-23 19:29:48
问题 Everytime I use AVSpeechSynthesizer to speak text Instruments reports a memory leak in the AXSpeechImplementation library. Here's the code I'm using to make the call: AVSpeechUtterance *speak = [AVSpeechUtterance speechUtteranceWithString:text]; speak.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"en-US"]; speak.rate = AVSpeechUtteranceMaximumSpeechRate * .2; [m_speechSynth speakUtterance:speak]; Here's the link to the Instruments screenshot http://imageshack.com/a/img690/7993/b9w5.png