Is there a good iphone sdk documentation site that provides good examples / common usage? - iphone

The problem? I look up stuff in the xcode documentation and find very useful lists of objects, methods, etc... But then I still have to go somewhere else to find useful example code of how to use that object. For example, I looked up NSNumber yesterday and found all of the neat stuff it can do, but I still had no clue how to use it. That's just an example. I'm sure I could read the objective c pdf front to back and learn something there (which I plan on doing) but what about later? When I'm looking up some UIKit object? Do I have to go find a tutorial each time (or lately, I just ask StackOverflow and you guys take care of me).
Is there a part of the apple website / xcode documentation that shows the example code I'm looking for?
Is there a wiki site out there or something that has what I'm looking for? (I just tried a simple google search "iphone sdk wiki". this site could be good. iphone sdk wiki . I'll check it out. Anyone else have one they like? )
This is also sort of a mild complaint to Apple. Why not a section on each code definition page that shows usage?

I've found the sample code section on Apple's iPhone Developer Connection be extremely useful not only for samples of complete applications but also a best practices source. Going through the code of The Elements, for example, will expose you to how to use particular classes as well as how to structure your code. It is a wonderful example of how to create a non-trivial iPhone app.

Look in developer.apple.com/iphone they have pretty good documentation (you can use the search bar there) on all the classes and have a lot of good sample code..

I really would emphasize the "Related sample code" section on many, if not most, of the documented classes.
But, IMHO, there isn't any easy way of acquiring the knowledge to develop in Cocoa/Cocoa Touch. The API's are so numerous that it simply takes a lot of time and experience. You just have to work on it, look at a lot of books and study the sample source code where available.
I've tried to take a purposeful approach by carving out some time every week to learning a new API/class irrespective of whether my current project needs it or not.

Alternatively, search Joe Hewitt. He's the developer for iPhone facebook. He has a project you can download that demonstrates all the features of facebook. It's an awesome open source project!

When you look something up in Xcode Developer Documentation, you sometimes get a Related Sample Code: text that tells you what Sample the method or property is used in. Too bad you can't click on it to see the code, but if you do click it takes you to the page to download the sample. – mahboudz 0 secs ago

Apple Developer site has all kinds of code examples. Try searching google for a UICatalog project, it will show you all the basic UI stuff you can do, like adding buttons and progressbars through using only code.

Related

Porting Max/MSP .app to iOS

I've read a number of posts on Apple's forums, and a number of posts on the Cycling '74 forums (with my own questions scattered around both) and nobody seems to be able to help me.
I used Max/MSP to write a 'patch' that takes samples and generates music. I'm going to release it as an album similar to Brian Eno's Thursday Afternoon, but wanted to make it available to people so they can have the music last for more than the hour a CD can hold.
What I don't know how to do, and can't figure out is HOW. It looks just like a regular OS X app, and the only difference I see in the directory structure is that my Max/MSP made application has extra .framework folders as well as the objects I use (which I guess are similar to 'functions' in JScript). I've looked at the package contents of both OS X files and the unpacked .ipa files from the App Store. Being so similar I would imagine it'd be pretty easy.
Where do I start? Has anybody on this forum done this? Thanks for your time!
[edit] - I just wanted to let you know I've discovered RJDJ, an iOS app that allows users to create 'scenes' in Puredata (Pd) and load them on their RJDJ program. I'd rather not go this route.
[edit2] - ok. I agree that it's very different. Especially having 4 (i could cut it down to 3) additional frameworks that aren't part of the SDK. But Ive been thinking. I can add a JavaScript object inside of my program, or make a special new object (object in max is sort of like a class in JS, i think) using C. Is there anything in these languages that would be able to convert a simple 'touch' to a 'mouseclick' in my app?
My application is very very simple. Basically just samples, played at randomly generated time intervals with some a 'conductor' to bring in/out the groups the samples are drawn from (piano, fx, etc...). So the user just clicks the 'start' button and off it goes. So the .nib file I would need to create is very simple. In my head it seems like the .ipa package/ios .app both contain unix executables and so long as these are basically the same it should work, right?
Max6 has been released.
A new object/concept named gen~ is available.
As far as I discussed with C74 dev, I know gen~ WILL provide its source code output. This code produce by the gen~ object could be useable in any other framework. basically, it will be C++
So it would really open A LOT of possibilities ; Max becoming a real graphical framework producing output that can be used in programming world.
It would save time for some part of the code.
As far as I can see from poking around at the Cycling '74 site and forums, there's currently no Max engine available for iOS. libpd is probably your best bet, really. (I'd note that the Inception app uses this Pure Data engine with a custom interface and it works very well.)
Unfortunately OSX and iOS apps are completely different under the hood. Outwardly they look similar (eg. you've noted the .app extension) but the internals are completely different.

How to create chart application in iphone

I'm assigned with new task for creating chart application in iphone like.,(BarChart,PieChart,etc..,).But,i have no idea for chart application in iphone.Please anyone help me out to guide me to start chart application in iphone.If any of the frameworks or API used for this kind of chart application means please explain that also.
Give a shot to:
Core-Plot Framework
To get it working, read here.
You can also see the accepted answer of this SO question.
For a little bar-chart tutorial go here.
There is also:
s7graphview less features but It's an option.
If you can rely on the web, although it's a far from optimal solution, you can embed a UIWebView in your application, and use the Google Graph Visualization API or you can use a UIWebView with an HTML5 graph library lake rgraph. Look here for a jQuery based solution. Filament Group made also this one.
At the and some sample code from Apple (Accelerometer Graph).
A commonly used Cocoa "native" charting library is core-plot. Whilst I've yet to personally use it, it seems to be quite popular and is under active development.
Here you go, but next time please use the search function first:
http://code.google.com/p/core-plot/
Cocoa Graphing/Plotting Framework that Works on iPhoneOS
A popular one is core plot. http://code.google.com/p/core-plot/

How do I build a wiki into an iPhone app?

I want to build an iPhone app that is really a wrapper around a wiki. Specifically, I have some static reference content that can be represented by a hyperlinked set of pages and want to build an app that will provide a nice interface over this content, including search, bookmarking, and annotating. I'm wondering what the best approach is for building something like this.
(I'm spent a fair bit of time googling for answers but pretty much every combination of search terms I can think of returns links to wikis, not links about putting a wiki into an app).
Are there libraries out there for handling wiki content (rendering, navigating links etc.)? I imagine I could just represent my content as a set of local HTML pages and point the web browser control at these but that doesn't seem right. Any ideas on how best to approach this in the iOS world?
Thanks in advance!
Try looking at TWedit, it is a wrapper for the excellent TiddlyWiki which is a single file WIKI built around JavaScript and HTML. TW is very powerful and well supported with many plugins available.

Is there a visual guide to the UIKit components?

My Problem is this, I want to add some component to my App I saw in some other App. Everytime I wnat to do this, I start googling around for the name. It took me some time to find the name of UIActionSheet. Now I'm looking for that transparent overlay that appears when you turn the volume up and down.
So, is there a good visual guide to the UIKit components? As an example, see the visual guide to swing components or this visual guide which is way to short/incomplete. And secondly, what's the name of the component I'm looking for?
The iOS documentation has a section called iOS UIKit UI Catalog that shows the various UI features by name with links to the API docs and recommend how and when they should be used.
Apple has provided a sample iPhone application called UICatalog. It lists all (or most?) of the standard UIKit component in different variants.
You can download the sample from here.
i recently had the same problem. Googling a lot i came across the following page. This overlay works pretty well and is easy to use.
look at: http://github.com/jdg/MBProgressHUD
Hope this is what you were looking for.

Reference for the C methods used in iPhone development

Is there a good reference somewhere with all the C functions that can be used by default in iPhone development (I guess they lie in the Foundation framework)? I mean functions like:
arc4random(), cos(), sinf(), hypot(), sqrt(), sqrtf() etc...
They are so many considering their variations too (sin(), sinf()) and googling every single time is ineffective.
Thanks :)
XCode/Help/Documentation
Then look in the Core Library. You may need to subscribe to one or more documentation sets first. Check that you search is not limited to Objective-C also.
If you're looking for all of the math functions, they can be found in the header file
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include/math.h
For more generic functions, in addition to the documentation, I often find it helpful to right-(or Control-)click on a function in my code and choose "Jump to Definition". This takes you to the related header, which might also have similar functions and constants.
The Apple iPhone OS Man Pages doc is the handiest guide for this kind of thing.
http://developer.apple.com/iphone/library/documentation/System/Conceptual/ManPages_iPhoneOS/
Unfortunately being HeaderDoc driven, there's no PDF version. I thought at one point Apple indexed these symbols in the Xcode docset API indexes, but they don't seem to be there now.
Good luck!