ios5.1

iOS: handling HTTP request's unicode characters

若如初见. 提交于 2019-12-02 17:43:20
问题 When I NSLog HTTP requests response string, it appears as "ãÃÂïãÃâ¬ÃÂãÃÂÃâãÃÂ" and something different appears on UILabel but not the same as I expect in Japanese/Chinese format. I am using ASIHTTPRequest and as mentioned here I have set response encoding to NSUTF8StringEncoding(server uses UTF-8 same) but it didn't help. Could someone please tell me how to support unicode character in my App? Thanks. - (void)getData { ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL

Still backups to iCloud even when addSkipBackupAttributeToItemAtURL is implemented?

谁说我不能喝 提交于 2019-12-01 19:12:55
My recent iOS app just got rejected because the application is storing data on Documents so it is backed up by iCloud, this is not allowed since the data is downloaded from a server. I'm trying to rebuild the code right now and have hit a tough spot when storing the data in the a folder calles Application Support instead. But even though I'm using addSkipBackupAttributeToItemAtURL it still shows up as a backup to iCloud. I'm only targeting 5.1 so it's not a versioning problem. I've added the affected code here below: NSString *newPath = [NSMutableString stringWithFormat:@"%@/Library

Creating a SecCertificateRef for NSURLConnection Authentication Challenge

你。 提交于 2019-12-01 05:14:14
I am receiving an authentication challenge from a server my app is trying to connect to, so I have implemented the connection:didReceiveAuthenticationChallenge: method. I need to send a SecCertificateRef and a SecIdentityRef . The identity is working, but the the certificate needs to be sent as a NSArray , and I can't figure out how to convert a CFArrayRef to a NSArray . This is my method for creating the identity and certificate: // Returns an array containing the certificate - (CFArrayRef)getCertificate { SecCertificateRef certificate = nil; NSString *thePath = [[NSBundle mainBundle]

UISplitView new slide-in popover becomes fullscreen after memory warning in iOS 5.1

岁酱吖の 提交于 2019-11-30 21:28:13
I'm quite new here. I have a problem with the new iOS 5.1 slide-in popover in UISplitView. (Before 5.1 the master view controller was presented in a popover, but now it simply slides in form the left.) When my device is in portrait mode and it receives a memory warning, the master view controller unloads; and when I press the toolbar button to slide in the master view, it loads again. However after the memory warning it is presented in fullscreen and not only the size of the original master view. (When I rotate the device to landscape and back to portrait, it gets its correct size back.)

Defining a property in iOS class extension

此生再无相见时 提交于 2019-11-29 09:26:28
I would like to add a property to UITableView in a Class Extension: @interface UITableViewController () @property NSString *entityString; @end Then I import the extension and then I use entityString property in a subclass of UITableViewController: @implementation CustomerTableViewController - (void)viewDidLoad { self.entityString = @"Customer"; ... [super viewDidLoad]; } ... Apple documentation says: the compiler will automatically synthesize the relevant accessor methods (...) inside the primary class implementation. But when I try to execute it I get this error: -[CustomerTableViewController

iOS 5.1 swipe gesture hijacked by UISplitViewController - how to avoid?

拥有回忆 提交于 2019-11-29 01:49:41
A new behavior in iOS 5.1 related to UISplitViewController apps seems to be intercepting UISlider motion with undesired results. This might also apply to UISegmented Controls and any other control surface that handles left-to-right gestures. With a UISplitView in Portrait orientation, the Master view is normally hidden. Starting in iOS 5.1 a right swipe on screen brings up the Master View on the left side of the device. The problem is, sliding the thumb of my UISlider control is misinterpreted as a screen swipe: if I give the UISlider thumb a sharp push to the right, the Master panel pops up.

how some apps can open setting app programmatically within their app

不想你离开。 提交于 2019-11-28 17:59:55
I know there are many questions: "How to open setting app programatically?" and the answer is "BIG NO". I know that Apple does not support opening Settings from any other app after iOS 5.0. But there are some apps like MapMyFitness which can open Settings, and they are available in the App Store and have been approved by Apple. MapMyFitness opens the Bluetooth settings if Bluetooth is turned off. I have checked this in iOS 6 and iOS 5.1. I want to know how can these apps are able to open Settings legally and bypassed Apple security because as per my information there is no legal way to do it?

How to show Xbutton(clear button) always visible in uisearchbar

我与影子孤独终老i 提交于 2019-11-28 07:50:55
问题 In my application, I am adding a UISearchBar. My intent is to enable the UISearch Bar "X button"(clear button in UITextField) to be always visible. I have tried using the following code below to try to make the "X Button" be always visible. However, it does not work. If I set tf.clearButtonMode = UITextFieldViewModeNever , the clear button in uitextfield not showing. I am not sure what is wrong? I would really appreciate anyone's help here. Why is this not working? Code (Not working) for

Open Twitter Setting from ACAccountStore (iOS 5.1 TWITTER)

被刻印的时光 ゝ 提交于 2019-11-27 21:52:53
问题 in iOS 5.0 i was opening Twitter setting from my app by [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=TWITTER"]]; but , this features is removed in iOS 5.1 , hence i can not able to open twitter setting . Now i am using + (void)makeRequestsWithURL: (NSURL *)url { // Create an account store object. ACAccountStore *accountStore = [[ACAccountStore alloc] init]; // Create an account type that ensures Twitter accounts are retrieved. ACAccountType *accountType =

iOS 5.1 with Xcode 4.3.1: [UIColor colorWithPatternImage:] strange behavior only on device

孤人 提交于 2019-11-27 18:10:06
When I compile my app in Xcode 4.3.1 with iOS 5.1, I notice there is a strange behavior with background textures only on actual device. There is a 1px gap in between texture tiles shown in screenshot below. My texture are 150x150 and 300x300 at 2x. So far I've tested the same build on: Simulator iPhone/iPad both 5.0/5.1: No bug iPhone/iPad running 5.0.1: No bug iPhone/iPad running 5.1: Buggy I've been getting the same problem since 5.1 aswell. I solved it by doing the following to the image in photoshop. You can probably do the same in another tool. Load the file, select all, and copy to