Questions tagged [ios4]

The 2010-2011 version of the iPhone/iPad/iPod Touch/Apple TV operating system family, made by Apple.

ios4
Filter by
Sorted by
Tagged with
414 votes
4 answers
50k views

Design for Facebook authentication in an iOS app that also accesses a secured web service

Goal: Allow a user to authentication with Facebook into an iOS application which requires access to a protected web service that I'm running. Assumptions: There is a native authentication (and ...
TMC's user avatar
  • 8,116
318 votes
15 answers
248k views

How do you use NSAttributedString?

Multiple colours in an NSString or NSMutableStrings are not possible. So I've heard a little about the NSAttributedString which was introduced with the iPad SDK 3.2 (or around 3.2) and is available on ...
Brock Woolf's user avatar
  • 46.9k
299 votes
10 answers
231k views

How can we programmatically detect which iOS version is device running on? [duplicate]

I want to check if the user is running the app on iOS less than 5.0 and display a label in the app. How do I detect which iOS is running on user's device programmatically? Thanks!
meetpd's user avatar
  • 9,219
237 votes
9 answers
140k views

How can I use NSError in my iPhone App?

I am working on catching errors in my app, and I am looking into using NSError. I am slightly confused about how to use it, and how to populate it. Could someone provide an example on how I populate ...
Nic Hubbard's user avatar
  • 41.9k
194 votes
13 answers
111k views

Handling applicationDidBecomeActive - "How can a view controller respond to the app becoming Active?"

I have the UIApplicationDelegate protocol in my main AppDelegate.m class, with the applicationDidBecomeActive method defined. I want to call a method when the application returns from the background,...
Calvin's user avatar
  • 8,735
167 votes
5 answers
84k views

Trying to understand CMTime and CMTimeMake

1) CMTimeMake(1,10) means duration of 1 second and timescale of 10, or 10 frames per second. This means 1s duration of video with 10 frames? 2) CMTime lastTime=CMTimeMake(1,10); CMTime frameTime=...
lilzz's user avatar
  • 5,321
166 votes
21 answers
70k views

Missing file warnings showing up after upgrade to Xcode 4

I recently upgraded to Xcode 4 (which is a great upgrade) but now I'm getting some warnings that I did not get before. I have looked through forums and other SO posts but have not come across how to ...
Scott's user avatar
  • 16.8k
151 votes
6 answers
67k views

When to use enumerateObjectsUsingBlock vs. for

Besides the obvious differences: Use enumerateObjectsUsingBlock when you need both the index and the object Don't use enumerateObjectsUsingBlock when you need to modify local variables (I was wrong ...
Paul Wheeler's user avatar
  • 19.5k
133 votes
24 answers
130k views

Unbalanced calls to begin/end appearance transitions for <UITabBarController: 0x197870>

I read SO about another user encountering similar error, but this error is in different case. I received this message when I added a View Controller initially: Unbalanced calls to begin/end ...
Raptor's user avatar
  • 53.8k
128 votes
16 answers
82k views

iPhone : How to detect the end of slider drag?

How to detect the event when the user has ended the drag of a slider pointer?
DroidHeaven's user avatar
  • 2,444
126 votes
4 answers
41k views

Why rename synthesized properties in iOS with leading underscores? [duplicate]

Possible Duplicate: How does an underscore in front of a variable in a cocoa objective-c class work? When creating a new project in Xcode 4, the boilerplate code adds an underscore character when ...
Alpinista's user avatar
  • 3,751
124 votes
12 answers
99k views

Disabling user selection in UIWebView

I have an app where I load content to a UIWebView and present this. I cannot disable user interaction completely because I want the user to be able to click links. I just need to disable user ...
Engin Kurutepe's user avatar
119 votes
4 answers
48k views

No suitable application records were found

I created an App Store archive file. During validation it raises an error with the following message Please make sure that you have set up a record for this application on iTunes Connect.
little boy's user avatar
  • 1,221
115 votes
18 answers
94k views

How to change Xcode Project name

I have developed my app in Xcode for iPhone, in start I have just named it without secnec now I want to change my app name I have replace my old app name with new one as I have found the name in my ...
Haseeb's user avatar
  • 1,185
113 votes
21 answers
63k views

Couldn't register with the bootstrap Server

I just changed some code in my program and got this error: Couldn't register com.yourcompany.XXX with the bootstrap server. Error: unknown error code. This generally means that another ...
MadProfit's user avatar
  • 1,174
110 votes
5 answers
42k views

Developing cross platform mobile application [closed]

More and more mobile platforms are being launched and sdk's are available to developers. There are various mobile platform are available: Android, iOS, Moblin, Windows mobile 7, RIM, symbian, bada, ...
sohilv's user avatar
  • 1,712
108 votes
20 answers
59k views

iPhone: How to switch tabs with an animation?

I'm switching tabs programmatically in a tab bar driven application using UITabBarController.selectedIndex. The problem I'm trying to solve is how to animate the transition between the views. ie. from ...
drekka's user avatar
  • 21.3k
94 votes
4 answers
66k views

How to cancel UIView block-based animation?

I've searched loads of SO stuff and in Apple's references, but still unable to manage my problem. What I have: A screen with 2 UIImageViews and 2 UIButtons connected to them 2 kinds of animation: ...
raistlin's user avatar
  • 4,318
90 votes
6 answers
42k views

How to print or log the value of CGSize object?

I was trying to log (print) the value of CGSize object like this: CGSize sizeOfTab = CGSizeMake(self.frame.size.width/tabCount, 49); NSLog(@"size of tab is %@",sizeOfTab); Is there anything wrong ...
Prasad's user avatar
  • 1,904
90 votes
11 answers
132k views

Convert a string into an int

I'm having trouble converting a string into an integer. I googled it but all I can find is how to convert an int into a string. Does anyone know how to do it the other way around? Thanks.
Yo_Its_Az's user avatar
  • 2,063
87 votes
13 answers
28k views

Custom installed font not displayed correctly in UILabel

I'm trying to use a Helvetica Neue Condensed font which I got from the Adobe Font Collection Pro Package. Unfortunately, it seems to draw incorrectly when I use it within a UILabel. The line height ...
MikeQ's user avatar
  • 1,817
87 votes
1 answer
33k views

AVPlayer and MPMoviePlayerController differences [closed]

I am developing an iPhone application that needs to play videos. So far, I learned that there are at least two API's for achieving this; AVPlayer and MPMoviePlayerController. What are the main ...
suse's user avatar
  • 10.5k
85 votes
4 answers
74k views

Using [UIColor colorWithRed:green:blue:alpha:] doesn't work with UITableView seperatorColor?

I'm trying to configure a dark gray seperator color. Why does the following do nothing? self.tableView.seperatorStyle = UITableViewCellSeperatorStyleSingleLine; self.tableView.seperatorColor = [...
skålfyfan's user avatar
  • 5,071
84 votes
8 answers
125k views

How to parse the Manifest.mbdb file in an iOS 4.0 iTunes Backup

In iOS 4.0 Apple has redesigned the backup process. iTunes used to store a list of filenames associated with backup files in the Manifest.plist file, but in iOS 4.0 it has moved this information to ...
Padraig's user avatar
  • 1,569
83 votes
10 answers
291k views

What programming languages can one use to develop iPhone, iPod Touch and iPad (iOS) applications?

What programming languages can one use to develop iPhone, iPod Touch and iPad (iOS) applications? Also are there plans in the future to expand the amount of programming languages that iOS will ...
user avatar
80 votes
4 answers
79k views

Install Xcode 3.2.3 w/ iPhone SDK 4, get "Base SDK missing", can't see other SDKs

I created this community wiki to bind together a number of other Q/A's I've seen here on SO. If you're here, you've probably installed the final version of Xcode 3.2.3 with iPhone SDK 4 (download link,...
76 votes
13 answers
99k views

How to compress/resize image on iOS before uploading to a server?

I'm currently uploading an image to a server using Imgur on iOS with the following code: NSData* imageData = UIImagePNGRepresentation(image); NSArray* paths = NSSearchPathForDirectoriesInDomains(...
joshholat's user avatar
  • 3,381
76 votes
8 answers
51k views

using dispatch_sync in Grand Central Dispatch

Can anyone explain with really clear use cases what the purpose of dispatch_sync in GCD is for? I can't understand where and why I would have to use this. Thanks!
Rasputin Jones's user avatar
76 votes
6 answers
96k views

Determine if an app exists and launch that app on iOS

Is there a way to check iOS to see if another app has been installed and then launched? If memory serves me this was not possible in early versions but has this been changed?
Rob's user avatar
  • 4,189
76 votes
4 answers
71k views

iOS Private API Documentation [closed]

Is there a web site or project documenting private APIs for the iPhone SDK?
Richard Stelling's user avatar
74 votes
13 answers
89k views

Get a list of all contacts on iOS

I want to get a list of all contacts of an iPhone. I checked Address Book reference, I may missed something but I didn't see it provides a method to get a list of contacts.
Chiron's user avatar
  • 20.2k
74 votes
13 answers
38k views

Offline iOS web app: loads my manifest, but doesn't work offline

I'm writing a web app to be used offline on iOS. I've created a manifest, am serving it up as text/cache-manifest, and it usually works fine, when running inside Safari. If I add it as an app to my ...
Ken's user avatar
  • 873
70 votes
12 answers
47k views

NSArray of weak references (__unsafe_unretained) to objects under ARC

I need to store weak references to objects in an NSArray, in order to prevent retain cycles. I'm not sure of the proper syntax to use. Is this the correct way? Foo* foo1 = [[Foo alloc] init]; Foo* ...
Emile Cormier's user avatar
68 votes
20 answers
54k views

iPhone UINavigation Issue - nested push animation can result in corrupted navigation bar

I keep getting the following errors: 2011-04-02 14:55:23.350 AppName[42430:207] nested push animation can result in corrupted navigation bar 2011-04-02 14:55:23.352 AppName[42430:207] nested push ...
joshholat's user avatar
  • 3,381
67 votes
9 answers
66k views

Center Align text in UITableViewCell problem

I'm kinda new to Objective-C and iPhone development and I've come across a problem when trying to center the text in a table cell. I've searched google but the solutions are for an old SDK bug that ...
Magpie's user avatar
  • 7,113
66 votes
7 answers
51k views

applicationWillTerminate when is it called and when not

Hi I have read several questions on SO about applicationWillTerminate getting called and not getting called. I wanted to summarize what I understood as there are several posts that speak differently. ...
Anand's user avatar
  • 4,212
65 votes
7 answers
35k views

AVCaptureVideoPreviewLayer doesn't fill up whole iPhone 4S Screen

AVCaptureVideoPreviewLayer *avLayer = [AVCaptureVideoPreviewLayer layerWithSession:session]; avLayer.frame = self.view.frame; [self.view.layer addSublayer:avLayer]; I use ...
Rafer's user avatar
  • 1,170
64 votes
8 answers
68k views

How to get keyboard with Next, Previous and Done Button?

I want to have a keyboard which has a Next,Previous and Done button on top of it. I have seen that in many apps. Especially where there are forms to be filled. I want to achieve something similar ...
Parth Bhatt's user avatar
  • 19.5k
62 votes
21 answers
91k views

How to add a UIView above the current UITableViewController

I have difficulty adding a subview (UIView) from within the viewDidLoad method of a UITableViewController This works: [self.view addSubview:self.progView]; But you can see the table cell lines ...
user558096's user avatar
60 votes
15 answers
65k views

How to check if a font is available in version of iOS?

I'm currently working on an app that uses the "ChalkboardSE-Regular" font and my deployment target is 4.0+. This font was not available in 4.1 but it is supported in 4.3. What would be the best way ...
tg2007's user avatar
  • 833
60 votes
10 answers
64k views

How to get audio volume level, and volume changed notifications on iOS?

I'm writing a very simple application that plays a sound when pressing a button. Since that button does not make a lot of sense when the device is set to silence I want to disable it when the device's ...
MacLemon's user avatar
  • 701
60 votes
1 answer
15k views

How to make an iPhone app compatible with multiple SDK (firmware) versions

With iOS 4 coming out soon, I have already planned to include an iAd in a future update of an app of mine. I assume that this will make my app unusable for anyone on a firmware lower than 4.0. Is ...
Dyldo42's user avatar
  • 2,358
59 votes
3 answers
24k views

How do I repeat a AVAudioPlayer?

I am just wondering how you repeat a AVAudioPlayer?
Seb OH's user avatar
  • 785
57 votes
6 answers
79k views

didReceiveRemoteNotification when in background

These kind of question has been asked a number of times but i have some specific situation going on. When my application is active and I receive a PUSH message i'm successfully able to parse the ...
Erwin's user avatar
  • 639
57 votes
7 answers
86k views

Circular Progress Bars in IOS

I want to create a circular progress bar like the following: How can I do that using Objective-C and Cocoa? How I started doing it was creating a UIView and editing the drawRect, but I am bit lost. ...
Kermit the Frog's user avatar
55 votes
3 answers
46k views

What are block-based animation methods in iPhone OS 4.0?

I am trying to implement a game using the iPhone OS 4.0 (iOS4?) SDK. In the previous versions of the SDK, I've been using the [UIView beginAnimations:context:] and [UIView commitAnimations] to create ...
kkrizka's user avatar
  • 893
55 votes
4 answers
51k views

Add/Delete UITableViewCell with animation?

I know this might sound like a dumb question, but I have looked every where. How can I do this? I know how to do this with a swype-to-delete method, but how cam I do it outside that function? Please ...
iosfreak's user avatar
  • 5,228
55 votes
3 answers
29k views

AVPlayer vs. AVAudioPlayer

The documentation for AVPlayer states the following: [The] player works equally well with local and remote media files However, the documentation for AVAudioPlayer states the following: Apple ...
joshwbrick's user avatar
  • 5,922
55 votes
2 answers
35k views

How to share keychain data between iOS applications

I am describing a problem for which it took me quite some time to learn the answer. The "GenericKeychain" example is a good start at providing a wrapper for sharing keychain data between applications ...
GtotheB's user avatar
  • 2,727
54 votes
7 answers
50k views

How to change the UISwitch default color(blue)

How to change the default color(blue) of a UISwitch?
Prasad's user avatar
  • 1,904

1
2 3 4 5
214