ios6

Using attributedText (NSAttributedString) on a UITextView on iOS6 only works with paragraph style or font but not both

房东的猫 提交于 2019-12-07 08:02:44
问题 I have been trying to use the attributedText property of UITextView to add adjustable line height to my custom UITextView. My code works fine in the simulator, but I am unable to make it work on an iPhone5. If I remove the font line the line height works but it the text reverts to a default smaller font. If I add the font, the font works but the paragraph styling is ignored. I have tried the code on a vanilla UITextView in a fresh app with the same behavior, which makes me think this is an

Detect incoming SMS or iMessage without Jailbreak

只愿长相守 提交于 2019-12-07 07:07:15
问题 In my app, I'm simply trying to detect an incoming SMS or iMessage. I don't need to know where it came from or its content, just that it came in. I've seen lots of jailbreak solutions. Is there a way to do this in iOS 6 without jailbreaking? 回答1: It looks like it is impossible to do that without JailBreaking. source: react on incoming sms on an iPhone 来源: https://stackoverflow.com/questions/15625095/detect-incoming-sms-or-imessage-without-jailbreak

Set status bar orientation in iOS 6.0 [duplicate]

北城以北 提交于 2019-12-07 06:52:13
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: setStatusBarOrientation:animated: not working in iOS 6 In iOS 6.0, as AppDelegate by default extends UIRepsonder and not UIApplication there is no global sharedApplication object. Am I missing anything? I am trying to set status bar orientation using following and it doesn't seem to work anymore. I tested it on iOS 6.0 simulator. I know you can set status bar tint color from the plist settings but can anyone

How to support airplay in the background in iOS6

安稳与你 提交于 2019-12-07 06:43:22
问题 My app should stream video's to an AppleTV via Airplay, even when the app is in the background. Under iOS5 it worked perfectly. In iOS6 it does not. Xcode gives me a deprecated warning on this line of code: moviePlayerViewController.moviePlayer.useApplicationAudioSession = NO; Is this the reason why my app isn't functioning correctly anymore. What is the equivalent of this piece of code in iOS6? 回答1: Found the solution: this problem can be solved by setting the right AVAudioSessionCategory

iOS 6 view hierarchy nightmare

这一生的挚爱 提交于 2019-12-07 06:18:19
问题 I have an app in the app store with nearly 5-star rating, but when iOS 6 came out, some of the views in in the app's main view hierarchy started blinking. This happens on the app that was in the store (I removed it when iOS6 came out) as well as in the simulator. I've spent about 14 hours, trying 100 things, to debug this in Xcode, but can't get any traction on it. Subviews disappear and reappear like there's a gremlin randomly setting the visible property off and on for each of them up to 10

iOS: Programmatically creating UIWindow results in wrong position

為{幸葍}努か 提交于 2019-12-07 06:10:45
问题 In iOS 5.1.1, I have found that if I create my UIWindow (I'm tired of IB), and set its frame to [UIScreen mainScreen].bounds, the window shows up under the status bar . However if I do the same thing is iOS 6, it appears in the right spot just below the status bar. CGRect r = [[UIScreen mainScreen] bounds]; self.window = [[UIWindow alloc] initWithFrame: r]; self.detailViewController = [[DetailViewController alloc] init]; self.window.rootViewController = self.detailViewController; [self.window

MPMoviePlayerController Overlay iOS 6

元气小坏坏 提交于 2019-12-07 05:53:41
问题 Having an issue with MPMoviePLayerController with an overlay in iOS6, prior to iOS6 things were working fine. It seems I can play a movie in full screen, before I had this code: @interface MovieOverlayViewController : UIViewController { UIImageView *skiparrow; } @end @implementation MovieOverlayViewController -(void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; touchtoskip.frame = CGRectMake( xAdjust, yAdjust, touchtoskip.image.size.width / scale, touchtoskip.image.size

Sorting Number using NSSortDescriptor

扶醉桌前 提交于 2019-12-07 05:28:23
问题 I got stuck in another problem again but after a long time. This time I have database (Core Data), having an attribute of numbers which contains integer numbers like 213879,123,4,345,56567 and so. I need to fetch data in ascending number order similar to like alphabetically order. I am doing this in way given below, fetchRequest.sortDescriptors=[NSArray arrayWithObject: [NSSortDescriptor sortDescriptorWithKey:@"numbers" ascending:YES selector:@selector(compare:)]]; but unfortunately it

UITextView can not detect link & address in iOS 7

£可爱£侵袭症+ 提交于 2019-12-07 05:25:11
问题 I have iOS application which supports iOS 6 as well as iOS 7. Now I am showing text in UITextView which contains email address & website urls. In iOS 6 , UITextView detects it correctly but in iOS 7 it doesn't detect when view gets loaded. But when I click on any link , email address it starts detecting all the link / urls. Is this a bug in iOS 7 or I am missing some settings specially for iOS 7 ? Below are the screenshots of app 1) In iOS 6+ when view loaded 2) In iOS 7 when view loaded 3)

IOS 6, safari fullscreen webapp, home button

江枫思渺然 提交于 2019-12-07 05:19:13
问题 I'm developping a webapp (javascript) to put on the homescreen of the iPad to be able to run it in fullscreen mode. Everything is working but after a random while, the home button doesn't work anymore. But the app still continuing to run, and the is no bug at all. I still can run javascript functions in the console with safari on my mac, alert, prompt, and all of those stuff are working. but not window.close(); To quit the application I have to restart my device by pushing the switch off