ios6

NSURLConnection timing out on iOS 6 but not on iOS 5

风流意气都作罢 提交于 2019-12-05 01:33:51
问题 I have an app that used NSURLConnection and worked just fine on iOS 5, now that same code is getting an instant timeout in iOS 6. Any idea on what might have changed between the two releases of 5.1 and 6.0? 回答1: In iOS 5.1 and previous versions the timeout interval being set when the request body was constructed was ignored for one reason of another. iOS 6 seems to pay attention and is more precise about the timeout interval so just make sure to set the interval to a value large enough to

how to make #key and @key clickable in IOS7

回眸只為那壹抹淺笑 提交于 2019-12-05 01:30:29
问题 Anyone knows how I can make the #KEY and @NAME clickable in the text of comments in IOS7 (the same way that instagram does it for example)? i am trying to use NSMutableAttributedString but I'm not sure how to detect click event, in the image below clicking @Username should take the user to the profile of the user 回答1: Looking at the UITextViewDelegate protocol, there is a new method in iOS7: textView:shouldInteractWithURL:inRange: . You didn't share any code, but it is safe to assume you have

UIActivity with no settings for Facebook

感情迁移 提交于 2019-12-05 01:11:56
Is it possible to show Facebook UIActivity in UIActivityViewController if there's no settings for facebook account in default iOS settings? For now if I enter some fb account - I see fb in UIActivityViewController , if no - not see. Any ideas? No it's not possible... If Facebook is not set up in Settings > Facebook , then the UIActivityViewController will not show Facebook as an option to share. It's possible with another view controller called OWActivityViewController https://github.com/brantyoung/OWActivityViewController It works for me! 来源: https://stackoverflow.com/questions/12899142

App only rotates in iOS 6 and not in iOS 5

安稳与你 提交于 2019-12-05 00:59:26
问题 I have made an app targeted for iOS 5 and iOS 6, and for some reason it only rotates when using it on devices with iOS 6, wether on an iPhone or an iPad, and doesn't rotate on devices using iOS 5. My app is universal. Please help me resolve this problem! Thanks 回答1: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { return ((toInterfaceOrientation == UIInterfaceOrientationPortrait) || (toInterfaceOrientation ==

iOS 6 Custom URL Scheme Launch Images wrong

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 00:47:25
问题 I have implemented custom URL schemes in my application. Also I have different names for the splash image using the UILaunchImageFile key in the info.plist. The documentations says: If your app supports one or more custom URL schemes, it can also provide a custom launch image for each URL scheme. When the system launches your app to handle a URL, it displays the launch image associated with the scheme of the given URL. In this case, the format for your launch image filenames are as follows:

iOS: disable UI mirroring in XIB

纵然是瞬间 提交于 2019-12-05 00:45:17
问题 in iOS 6 there's a new "feature" that mirrors the UI elements in the xib file if the user is on right-to-left locale (hebrew, arabic). (http://developer.apple.com/library/ios/#documentation/miscellaneous/conceptual/iphoneostechoverview/iPhoneOSTechnologies/iPhoneOSTechnologies.html) It completely messes up my interface. Is there a way to disable it without disabling auto-layout? 回答1: Horizontal constraints have the "Direction" option in Interface Builder. By default it's set to "Leading to

Using Dictation - iOS 6 - DidStart?

丶灬走出姿态 提交于 2019-12-05 00:12:20
问题 How to respond to starting dictation? Known ways of responding to dictation: dictationRecordingDidEnd - respond to the completion of the recognition of a dictated phrase. dictationRecognitionFailed - respond to failed dictation recognition. Reference: UITextInput Protocol Reference Starting in iOS 5.1, when the user chooses dictation input on a supported device, the system automatically inserts recognized phrases into the current text view. Methods in the UITextInput protocol allow your app

Sharing video on Facebook fails

删除回忆录丶 提交于 2019-12-04 23:36:14
问题 I am sharing a video on Facebook using Facebook SDK 3.1.1. I have mentioned the code here. FBRequestConnection *newConnection = [[FBRequestConnection alloc] init]; // for each fbid in the array, we create a request object to fetch // the profile, along with a handler to respond to the results of the request NSString *fbid = @"me"; // create a handler block to handle the results of the request for fbid's profile FBRequestHandler handler = ^(FBRequestConnection *connection, id result, NSError

NSAttributedString '\\n' ignored

落花浮王杯 提交于 2019-12-04 23:09:39
I have a single view whose only UI element is a UITextView . In viewDidLoad: I create an attributed string with "Text\n" and set the text view's attributed text as such: NSAttributedString *string = [[NSAttributedString alloc] initWithString:@"Text\n"]; [self.textView setAttributedText:string]; My problem is that the line break is ignored when I run the app. If I use an NSString and setText: that doesn't happen. NSString *string = [[NSString alloc] initWithString:@"Text\n"]; [self.textView setText:string]; Can anyone shed some light on what is happening? I can't seem to find anything in

How can I remove UILabel's gray border on the right side?

北城余情 提交于 2019-12-04 22:52:21
I have added an UILabel to a custom cell's contentView. I met with a strange side effect. On the right border there is a gray edge. I don't know why. I just added an ordinary UILabel, I have done nothing else. UILabel *label = [[UILabel alloc] initWithFrame:CGRectZero]; label.text = @"value1"; label.textAlignment = UITextAlignmentCenter; [self.contentView addSubview:label]; - (void)layoutSubviews { UILabel *label = [self.contentView.subviews objectAtIndex:i]; label.frame = CGRectMake(…); } I know this is an old question but I have just come across this exact same problem, so I thought I could