Web site that collects and discusses Cocoa Touch design patterns? - iphone

Does anyone know of one? If it doesn't exist, anyone interested in collaborating to create it?

The delegate pattern is a design pattern that is pretty central to making the most of a number of UIKit classes. Apple's developer documentation pages (example) would be good web resources that collect information about related methods.
EDIT: Here's a page on Cocoa implementations of the observer pattern. Here's a book on Cocoa implementations of design patterns. With respect to iPhone development, KVO Cocoa bindings haven't yet been implemented.

Update:
Also see: http://www.cocoacontrols.com/
Best site so far is here, and http://www.iphoneexamples.com/
Others are iosdevelopertips.com, iphonedevsdk.com, iphone.zcentric.com, and of course the official Apple Dev forums.
I've come across many (mostly barcamp) communities who begin such efforts but haven't had the time to follow through. I would agree such a site would be useful because there are many challenges cocoa touch presents which aren't present with OS X (memory, performance, no background processes, etc.).
I can only come to the conclusion that everyone is under their employer/client NDAs and/or everyone is too busy to create such a site!

Related

Apple's MVC vision code samples

I know that there are a lot of patterns like MVC, MVP, MVVP etc, I don’t want to discuss which is better here (it’s prohibited by StackOverflow’s rules), I just want to find out Apple’s latest vision on that patterns, including Swift and protocols.
I want to understand what operations Apple uses itself (e.g. in their own apps) in ViewController, what in Model and how they are splitting code.
I have found only very old documents on Apple’s web about Cocoa MVC, is there any new documents with Swift examples?
Where I can to get modern Apple’s pattern vision application examples? I don’t want sample «dirty» code, I want to find out sample finished application with correct coding patterns.
I'd suggest to take a look at the latest WWDC videos, namely Protocol and Value Oriented Programming in UIKit Apps
What they show there is reminiscent of Model-View-ViewModel (MVVM) approach. Their controller models are basically immutable view models.
It is hard to give a definitive answer without being affiliated with Apple. However, one may argue that Apple still promotes MVC incorporating Protocol-Oriented Programming.

iPhone Application logic

I need to develop a client application for a site that host and show images.
The client should shows all new images and take a picture and send to website.
I'm a newbie to iOS programming so this question:
In an application alike this, there's the need to create a Model? I ask this question because I think I can do anything with Controllers but maybe I'm wrong.
While there is never a "need" to create a model, it's good form to do so, and it'll likely save you many headaches down the road. Ultimately, you're going to need to deal with images and websites and how they interact with each other and whatnot, so you might as well do it in models from the outset.
I'm as guilty as anyone for wanting to see immediate results and hack together something quickly, but I always regret it later on, and have to spend more time than I'd expected refactoring it into something usable.
The MVC pattern as used in Mac OS and iOS applications isn't something best explained in an answer box but here's a link to some simple documentation about the roles of Models, Views and Controllers
Some good basic introductions to start with, which also have relevant links to the next stage of documentation are:
Cocoa Core Competencies
Cocoa Application Competencies for iOS
Read these excellent articles first. You'll learn better and faster if you do some basic reading.

Looking for a few tutorials on switching views and cross-view communication

I'm looking for a few good tutorials or articles out there that might help me with communicating between different views which I have setup in a TabBarController.
I'd like to know how to properly call upon methods in other views of my TabBarController and then switch to that view.
The other thing I am curious about is how to launch views which are not part of the TabBarController.
I know these are simple questions, but for whatever reason I've been having real difficulty getting these simple tasks accomplished even after reading Apple's documentation.
Thanks in advance,
David
Your questions are very broad and open-ended and, as such, will be difficult to answer specifically. If you need specific answers to a specific problem, you'll have to describe the problem in detail (perhaps with code snippets) to help us answer you.
Basically, your question is: "How do I learn the fundamentals of the iOS view hierarchy and communication chain?", I am right?
I've told so many people this same thing, that I made a tinyurl for it -- one of the best books ever to get started and help people understand the basics of iOS, how things interlink, how to communicate between views, etc., is this book
Beyond that, there are a number of forums specifically dedicated to iPhone tutorials. In addition, if you're an iOS developer, you should have access to Apple's own video university (free!), and documentation (also free!) -- those are great places to start.
Good luck!

Resources how to architect a iPhone application?

What resources can you recommend for learning how to architect a iPhone application?
Background of the question is that most of the resources explain the usage of a single class or concept (and i appreciate that a lot to learn something about the specific topic) but as far as i can see they lack unfortunately to describe how to put things together for typical real world applications.
This won't give you a ton of help with architecting large applications, but I found this site to be really useful for finding good examples for working with animations and all the ViewController stuff: http://appsamuck.com/
You should focus your search on best practices, as a lot of the details that go behind proper architecture are found in getting those general fundamentals right.
Otherwise, if you want to know how "typical real world applications" are designed, you should go and find some open source projects and download them. There will undoubtedly be a variation in quality but it should give you a general idea of how apps get built.
Overall I don't think you'll see a general tutorial on how to build an iPhone app because all applications are different. They solve different problems under different requirements for different kinds of users. You'll probably find that the answer to your question can only be found by trying to build something on your own.

IPhone: Creating a Facebook like UI, Skinning Apps, Not following the AHIG

How do you design a UI like Facebook?
Is it hard to implement a custom skin into a iphone app? How is it done?
Do I need to follow apple's guideline? What if I don't want to?
How do you design a UI like Facebook?
Facebook's iPhone app appears to be built around using UITableView in various guises. It looks like it adheres to the Apple Human Interface Guidelines.
Is it hard to implement a custom skin
into a iphone app? How is it done?
Skins are just graphic elements that are designed to have their image components swapped out. They are not difficult to implement.
Do I need to follow apple's guideline?
What if I dont want to?
Apple will not penalize you for a non-standard interface. The only interface restrictions are (1) some issues of obscene content and (2) you can't create the illusion that the device itself is broken, has crashed or otherwise failed.
A bit of advice. Don't use non-standard interfaces.
Good interfaces are almost by definition standardized so that users don't have to think about them. Novel interfaces slow users down even if they have no problems otherwise. Just try switching rapidly between Mac, Windows and Linux sometimes. None of the interfaces has major problems per se but having to stop and think how to do something in each particular interface is a pain. You can create the same problem by using a good but non-standard interface within an app.
That is assuming of course that you can actually create a good interface. There are far, far more ways to make bad interfaces than there are to make good ones. Most interfaces fail even those designed by interface gods. The standardized interfaces are the result of tens of thousands of hours of testing and years of experience. You're unlikely to whip out something really new and useful your first time out.
If you try something novel I suggest you mock it up first and then test let people test it without giving them any instruction. You'd be surprised how complex it can get. We used to just make photoshop mockups and then ask test users what they thought each element did or which element they would choose to accomplish a particular task. We were surprised at how poorly our (the developers) perception of the interface overlapped with the perception of the users.
In sum, a novel interface is more likely to hurt your app than help it.
With regard to how to build an app like Facebook, check out Three20. In particular, the TTLauncherView is the class that implements the Springboard-like grid of icons.
3- You don't need to follow the AHIG. But be careful if you don't, because it's very easy to go wrong doing so. Users like to not have to learn anything new. They know the typical Apple software UI, so if you use it, users will know how to use your app as soon as they buy it. If you don't use it, it is important to make sure that the UI is exceedingly easy and intuitive, and looks good to an iPhone user's eyes (and fingers).