cocoa-design-patterns
What's the problem with using singleton in an app that use a lot of HTTP request?
I have a singleton class that basically interface all my HTTP requests. So it pretty much looks like this:[详细]
2023-03-15 10:46 分类:问答Why do some objects not need to be initialized before use in objective-c?
Why do some objects not need to be initialized before use in 开发者_运维技巧objective-c? For example why is this NSDate *today = [NSDate date]; legal?They are initialized within the date method. This[详细]
2023-03-06 04:22 分类:问答Getting an NSArray of a single attribute from an NSArray
I am facing a very regular scenario. I have an NSArray which has object of a custom type, say Person. The Person class has the attributes: firstName, lastName and age.[详细]
2023-03-05 00:16 分类:问答What is Dynamic Creation?
I recently read about Dynamic Creation as one of the design pattern in Cocoa. However, I don\'t really understand how it works. So I need clarification from you who have implemented in your design.[详细]
2023-03-03 22:13 分类:问答What is the right pattern for instantiating a device specific view controller in a Universal App?
I\'mnew to objective-C so, bear with me. I started with the Universal App template in Xcode4 and b开发者_如何学Pythonuilt my application. There is a convention that the template starts you off with th[详细]
2023-02-24 03:34 分类:问答Dynamically load custom plugins (libraries) in a Cocoa application
I have developed a Cocoa application for Mac OS X. I want to make some custom plugins (with interface too) and dynamically load them in my app. My app should l开发者_JAVA百科ook inside a folder and re[详细]
2023-02-20 12:37 分类:问答How to populate a stack with objects of various types
Using an NSMutableArray ivar, I plan to write a class that acts like a stack and which objects of various types should be able to be retrieved from.[详细]
2023-02-17 02:06 分类:问答What is the correct system design when dealing with third party API?
Thi开发者_开发问答s blog post by Joubert just opened my eyes. I have dealt with a lot of design patterns in Java and other languages. But Objective-C is a rather unique language.[详细]
2023-02-08 03:18 分类:问答Java Command Pattern vs iPhone Delegate Pattern
Hi I am a java developer and these days I have also started working on iphone development. I was wonderin开发者_运维技巧g that Java\'s command pattern is somewhat similar to delegate pattern in iphon[详细]
2023-02-01 09:59 分类:问答Making Objective-C Classes look Beautiful
I wanted to ask you all for you opinions on code smells in Objective C, specifically Cocoa Touch. I\'m working on a fairly complex game, and about to start the Great December Refactoring.[详细]
2023-01-29 09:18 分类:问答