iphone-sdk-3.0

Easiest way to support multiple orientations? How do I load a custom NIB when the application is in Landscape?

左心房为你撑大大i 提交于 2019-11-26 12:41:23
I have an application in which I would like to support multiple orientations. I have two .xib files that I want to use, myViewController.xib and myViewControllerLandscape.xib. myViewController.xib exists in project/Resources and myViewControllerLandscape.xib exists in the root project directory. What I want to do is use a separate NIB (myViewControllerLandscape.xib) for my rotations. I try detecting rotation in viewDidLoad l ike this: if((self.interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (self.interfaceOrientation == UIInterfaceOrientationLandscapeRight)) { NSLog(@"Landscape

Can I change the color of auto detected links on UITextView?

一笑奈何 提交于 2019-11-26 12:07:38
I had a UITextView that detects phone numbers and links, but this overrides my fontColor and change it to blueColor . Is there a way to format the color of auto detected links, or should I try a manual version of this function? stonemonk On iOS 7 you can set the tintColor of the UITextView . It affects the link color as well as the cursor line and the selected text color. iOS 7 also added a new property to UITextView called linkTextAttributes which would appear to let you fully control the link style. Instead of using an UITextView, I used an UIWebView and enabled the "auto-detect links". To

Entitlements are not valid

a 夏天 提交于 2019-11-26 12:07:32
问题 Recently, I have upgraded my iPhone SDK OS from version 2.2.1 to 3.0 version. After that, while building my application, I get an error that the provisioning profile has expired. So I created a new provisioning profile. Then I made the distribution of my application with the provisioning profile. But I get an error in iTunes while synchronising my application into an iPhone device. The error message is \"The application \'iGVA\' was not installed on the iPhone because the entitlements are not

Sending POST data from iphone over SSL HTTPS

蹲街弑〆低调 提交于 2019-11-26 11:47:30
问题 Hai all, In my iphone project i need to pass the user name and password to a web server,previously i pass data using GET method and used the url with GET format (eg: localhost:8888/login?userName=admin&password=password ) but now i need to sent this as a POST data, can any one help me to find what wrong in this code below ? code i tried .. NSString *post =[NSString stringWithFormat:@\"userName=%@&password=%@\",userName.text,password.text]; NSData *postData = [post dataUsingEncoding

Accessing & Using the MobileWiFi.framework

我怕爱的太早我们不能终老 提交于 2019-11-26 11:24:58
问题 For a personal project of mine, I\'m trying to retrieve iPhone WiFi signal strength. I\'m fully aware that this in the land of undocumented goodness, so please refrain from the \"No Appstore\" answers. :) Anywho, I\'ve been reading up on previous WiFi Network Scanner Apps (WiFi Stumbler), but I\'m afraid most (if not all) reflect outdated SDK documentation. Hopefully, this question will also provide some centralized / insightful material with the most recent iPhone SDK 3.1.2. Here\'s my

How do you optionally use iPhone OS 3.0 features in a 2.0 compatible app?

若如初见. 提交于 2019-11-26 11:06:27
I'd like to use some features of iPhone OS 3.0 in my 2.0 app when it runs on a 3.0 device. I don't want to go 3.0 all the way because there are customers who do not want to update yet. I experimented a bit with weak linking of the MapKit.framework (-weak_framework MapKit). I found it quite cumbersome, since I had to trick the compiler/linker to use the 2.0 SDK with all code except the one which uses MapKit. Has anybody more experience with this? What are you doing to make it compile/link. Has anybody already submitted an app to Apple, which weak-links frameworks from other OS versions? Apple

How to solve “Application failed codesign verification” when uploading to iTunes Connect?

亡梦爱人 提交于 2019-11-26 10:35:46
问题 I\'ve got a problem that I couldn\'t solve with a deep search in different resources as most of the \"similar\" points out to be an error with Icon.png size, etc... I\'ve tried to upload my application after verifying that: Correctly builds and run on my device That my certificates are installed properly That my certs / profiles are not expired. That the Icon.png has the proper size and format of 57x57 PNG. And several other things. Ran codesign --verify -vvvv MyApp.app which worked fine. My

iPhone speech recognition API? [duplicate]

与世无争的帅哥 提交于 2019-11-26 10:33:49
问题 This question already has an answer here: iPhone App › Add voice recognition? [closed] 4 answers The new iPhone 3GS has support for voice commands, stuff like \"call Bill\" or \"play music by the strokes\" and whatnot. I was looking through the iPhone SDK, but I cannot find any references to this capability. All of the search keywords I choose seem to only find the new voice chat functionality. Does anyone know whether Apple has added voice command APIs to the SDK, or whether it\'s yet

Best way to check if an iPhone app is running for the first time

馋奶兔 提交于 2019-11-26 09:17:10
问题 I want to check if my iPhone app is running for the first time. I can create a file in the documents folder and check that file to see if this is the first time the app is running, but I wanted to know if there is a better way to do this. 回答1: I like to use NSUserDefaults to store an indication of the the first run. NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; if (![defaults objectForKey:@"firstRun"]) [defaults setObject:[NSDate date] forKey:@"firstRun"]; [[NSUserDefaults

Can I select a specific block of text in a UITextField?

蓝咒 提交于 2019-11-26 08:29:38
问题 I have a UITextField in my iPhone app. I know how to make the text field select all of its text, but how can change the selection? Say I wanted to select the last 5 characters, or a specific range of characters, is that possible? if not, can I move the lines marking the beginning and end of the selection, as if the user is dragging them? 回答1: With UITextField, you cannot. But if you see the headers, you have _selectedRange and others that might be used if you add some categories to it ;)