182
votes
4answers
28k views

Should IBOutlets be strong or weak under ARC?

I am developing exclusively for iOS 5 using ARC. Should IBOutlets to UIViews (and subclasses) be strong or weak? The following: @property (nonatomic, weak) IBOutlet UIButton *button; Would get rid ...
128
votes
5answers
51k views

Some questions about Automatic Reference Counting in iOS5 SDK

I'm currently developing an app for iPad. The development started for iOS 4.2 and is now continuing (and I think will be completed) for iOS 4.3. I just read about ARC in iOS 5, and basically I ...
130
votes
4answers
28k views

Disable Automatic Reference Counting for Some Files

I have downloaded the iOS 5 SDK and found that ARC is a great feature of the new Apple compiler. For the time being, many third party frameworks don't support ARC. Could I use ARC for my new code and ...
74
votes
7answers
10k views

To ARC or not to ARC? What are the pros and cons?

I've yet to use ARC, since the majority of the code in the project I'm working on at the moment was written pre-iOS 5.0. I was just wondering, does the convenience of not retaining/releasing ...
34
votes
7answers
33k views

Container View Controller Examples

Can anyone point me to any good examples of creating a Custom View Controller as a Container View Controller? The only documentation I can find is a couple of paragraphs in the UIViewController Class ...
36
votes
6answers
9k views

iOS 5 does not allow to store downloaded data in Documents directory?

I have made an application for my client by keeping target iOS as 4. But since the application still not submitted to Apple store, my client is planning to upgrade it for iOS 5.0. For this I read ...
15
votes
4answers
626 views

Declaration/definition of variables locations in ObjectiveC?

Ever since starting to work on iOS apps and objective C I've been really puzzled by the different locations where one could be declaring and defining variables. On one hand we have the traditional C ...
7
votes
1answer
613 views

Can we invite people to use our app or send friend request from the app via Facebook in iOS 5?

Consider X and Y are friends in Facebook and they both have installed an app in their respective phones. But they are not friends with each other in that app's friend list. So now, can X send a friend ...
41
votes
3answers
13k views

iOS 5: Curious about UIAppearance

On the tech talk 2011 I saw a speech about the new UIAppearance protocol. There is not a lot of documentation out there yet. I will shortly summarize what I remember to explain where my question is ...
29
votes
2answers
13k views

ARC forbids Objective-C objects in structs or unions despite marking the file -fno-objc-arc

ARC forbids Objective-C objects in structs or unions despite marking the file -fno-objc-arc? Why is this so? I had the assumption that if you mark it -fno-objc-arc you don't have this restriction.
4
votes
2answers
7k views

iOS Background downloads when the app is not active

When my app is initially downloaded, the user needs to download a large file something like 200MB (upper limit). I definitely cant expect the use to keep the app open till this file is donwloaded. So ...
17
votes
1answer
2k views

Should I refer to self.property in the init method with ARC?

A quick question. if I have a property and an ivar declared with the same name: in the .h file: (Reminder*)reminder; @property(nonatomic,strong)(Reminder*)reminder; in the .m file, should I use ...
5
votes
5answers
9k views

iOS 5: How to convert an Emoji to a unicode character?

I want to convert an Emoji to a unicode character in iOS 5. For example, converting to \ue415. I went to NSStringEncoding in NSString Class Reference. In iOS 4, NSUTF16BigEndianStringEncoding and ...
20
votes
5answers
5k views

NSArray of weak references 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* ...
12
votes
10answers
4k views

iOS App crashing before entering main() with Xcode 4.2 & iOS 5

Background After upgrading xcode4.1/ios4 to xcode4.2/ios5 I am experiencing crashes while the App is loading and before it even enters main(). I have set a break point in main() but it is never ...

1 2 3 4 5 28
15 30 50 per page