cocoa-touch

Where to look up the date format specifiers used in cocoa / cocoa touch?

For example: [dateFormatter setDateFormat:@"yyyy-MM-DD HH:mm:ss"]; I guess there's a list somewhere that shows all those date format specifiers, but can't find any. The NSDateFormatter docs seem to not mention these. ...

How to dynamically build up the arguments for NSLog?

Example: I have a complex method that does a lot of stuff, and at the end I want to print a report with NSLog. NSLog wants a string, and then an arbitrary number of arguments. So lets say there are these possible values which can be logged: A B C D E F It can happen that -for example- C and D are not logged, but the whole rest. Ho...

UILabel not aligning perfectly center when wrapping

See image for example: http://img25.imageshack.us/img25/6996/90754687.png The grey background indicates the size of the UILabel frame. For some reason, the first line of wrapped text doesn't seem to always center, even though I'm using UITextAlignmentCenter. Here's the code I use to set up my labels: self.titleLabel = [[UILabel a...

How to download an image from the web and display it in an UIImageView?

How to download an image from the web and display it in an UIImageView? For example, I have an URL like: http://sstatic.net/so/apple-touch-icon.png Would I need to mess around with NSURLConnection and the like, or is there a simple method that takes an web URL and downloads the image data automatically? ...

Where can I find sample code for integrating iAds within my application?

I'm just starting to learn how to integrate iAds within my application. I have read all of the documentation on this provided by Apple, but I still have some questions about the process. Is there any sample code or better documentation out there that shows how to place iAds within an application? ...

iPhone: create new "View-based Application" = no view controller?

I have created a new iPhone "View-based Application" in Xcode. I then added a new "UIViewController subclass" and checked the "with XIB for user interface. Now the issue I have is that after hooking up all the variables and message handlers, I cannot push the new controller onto the stack using the following code: [self.navigationContro...

How do I create a UISlider dynamically in code?

I would like to know how to create a UISlider at runtime. ...

drawing path on map in iphone

can we draw path on mapview in iphone os 4.0? how can we do that? Please help me... ...

Multi-Layer Parallax Scrolling views?

I am looking to setup a multi-layer parallax scrolling background for a game application and was wondering how I might go about this. The application will scroll left to right (in landscape mode) and I am looking to setup three layers, foreground trees, background hills and distant clouds all moving in parallax. Each layer going back wil...

UITabBarController now kills inflight UIKit animations when switches between tabs ?

I have an app that has UITabBarController with two UIViewControllers as its tabs. In the first UIViewController.view I have a continuous animation with repeat count set to INT_MAX. It worked fine until 3.2 and 4.0. On 3.2 or newer, when I switch to a different tab, OS skips to the end of my animations and invokes -animationDidStop:fi...

Decrease UITableViewCell width and put custom button on the left

Is there any way to decrease the standard width of grouped UITableViewCell and put a custom button on the left side(outside of cell boundary)? I tried to change the cell size but it keeps same ...

touch & touch and hold in iphone

Hi, I have a embedded webview in my app with a navbar and a uitabbar. when i touch and hold the uiwebview the copy,paste menu appears. Can i handle a single touch to show and hide my navbar and uitabbar ? ...

Object and view setup and initialization in objective-C

When creating a UIViewController derived class in objective-C, what goes into the init method, what should go into loadView and what into viewDidLoad - and more importantly why, and what benefit (performance?) does this have? Also, how does this relate to UIView derived classes where the only option you have is the init method? I know ...

points between source and destination on a mapview

Is there any way to get points between source and destination on a Mapview? So as to plot a route between these two points? ...

Difference between adding a subview and presentModalViewController method

I know this might be very simple but what is the difference between these two pieces of code? I know that the second method adds a subview, and that the second code loads the BlueViewController on load and then it does a lazy load with the YellowViewController class (if it's not loaded on the RootViewController). What are the advantages...

What's the difference between formal and informal protocols in Objective-C?

What's the difference between formal and informal protocols in Objective-C? ...

draw overlay on a map

How to draw an overlay on the mapview? ...

Overlay to the Mapview?

How can we draw an overlay on a MapView? ...

how to create static library with protect to access .m file

i have start create my static library and then add .h and .m file to my project, then set role of .h file as public after that build and copy mylibraryfile and .h file from build folder to another project then i click on .h file and Go To Counterpart Button still able to access to my .m file? how can i fix it? or i do somethings wro...

adding overlay on mapview?

How to add overlay on a mapview? ...