cocoa-touch

How do I remove the UINavigationBar from a UIViewController?

I'm experimenting with the NavBar sample project for iPhone. When I tap on one of the rows in the table in the default view a new view slides in (so far so good). I want to remove the UINavigationBar bar at the top of the new view that slides in. How can I do this? EDIT: I meant "UINavigationBar". Thanks to everyone who responded!...

Showing a view controller from an OpenGL view

Hey! I have created an iPhone application based on an OpenGL view. Now I would like to show a "settings" form. Since my code runs in UIView, I have no pushViewController. How do I show a view controller on screen? Thanks! ...

How can I change the animation style of a modal UIViewController?

I'm currently displaying a UIViewController like this: [[self navigationController] presentModalViewController:modalViewController animated:YES]; and hiding it like this: [self.navigationController dismissModalViewControllerAnimated:YES]; The animation is "slide up from the bottom"... then slide back down. How can I change the ani...

adding multiple views to view controller inside a tab controller

I have a tabview controller to which I added a UIViewController to each tab. I want to have multiple UIViews inside the UIViewController. So in the implementation of the UIViewController class I added [self.view addSubView:uiview1] and [self.view addSubView:uiview2]. The problem is that when I run the app, it crahes on load. However, i...

Can an iPhone or iPod Touch communicate with another device in the same room?

I'm new to developing applications for the iPhone and iPod touch. Is it possible to communicate directly between 2 devices in the same room by using WiFi or perhaps even BlueTooth on the iPhone? I've seen a demo of a fire application where one iPhone "lights" other iPhone when they get close to each other. How is this accomplished? T...

iPhone SDK: Advancing from one view to another using a button tap

I want to make a really simple iphone app: one screen with a single button... when the button is tapped a new screen appears. That's it. No animations, nothing, I've tried endlessly to make the NavBar sample project do this... and it works but only if I use a UINavigationController with a table that I can tap etc. I've tried all the...

How to do a flip animation between more than two UIViews?

I have animation code in a class that extends the UIView: // Start Animation Block CGContextRef context = UIGraphicsGetCurrentContext(); [UIView beginAnimations:nil context:context]; [UIView setAnimationTransition: UIViewAnimationTransitionFlipFromLeft forView:[self superview] cache:YES]; [UIView setAnimationCurve:UIViewAnimationCurveEa...

How do I move the UIView to the "bottom" so that the next UIView displays?

I want to "remove" a UIView from a superview and add it again at the end... but at the "bottom" of the rest of the UIviews that belong to the superview. Is this possible? Any help is very appreciated! ...

How do I make a UIView "scrollable" in my iPhone app?

I have a UIView that will eventually contain about 2 screens worth of information. I want to give the user the ability to scroll down via flicking (just standard flicking like in Safari). How do I do this? ...

How do i tell my application to close?

I have just discovered the nifty unhandled exception handler for cocoa-touch. Now that i can gracefully notify the user about any unhandled exceptions that might crash my application. I'd like to shut down my application after notifying the user that a crash has occured. Does anyone know how to shut down an application programmaticall...

How could I store Image retrieved from web, into application bundle?

Hi I am developing iPhone application and In that application I've one TableViewController, and that TableViewController made up of Custom table cell. into those cell I am loading image from URL, but the scrolling is not that smooth,(because each cell load images everytime when scrolling happen.) So I decided to store those images into...

How to "rotate" a layer/view (e.g. just like you would in enigmo)

I know how to move a layer based on touch. But I would also like to be able to rotate the image. Is there any sample code that shows how to do this? Or can anyone give me some advice? Thanks! ...

Pass values between Views

I have MainViewController calling WebViewController (From UICatalog sample application) In WebViewController I make some function setValue(){...} to set some value passed as parameter to the variable (NSString *value) from WebViewController.h but when I try from MainViewController something like WebViewController targetViewController... ...

UIImage and UILabel outside UiTableView

Hi all, look at this image: I know how to add UITableView with grouped style and how to add label in any table cell. But how can I add image and labels on top on the view, like screen. ...

UIWebView Expose Objective C to JavaScript

How would I expose an Objective C method within JavaScript when using the iPhone SDK when using the UIWebView? Any help would be appreciated! ...

What' the best way to save iphone app setting?

I'd like to allow user to change the setting of app. But I am not sure where shall I save the configuration. Is there any local space allocated for app? Thanks. ...

Best way to store static reference arrays/dicts in Cocoa touch

I have several arrays of arrays or arrays of dicts that I would like to store in my iPhone app. This lists are static and won't be modified by the app or users. Occasionally they may be displayed but more likely they'll be iterated over and compared to some input value. Would the best way to store these arrays be a CoreData/SQLite dat...

Is parentViewController always a Navigation controller?

I was kind of scratching my head at this a week ago, and now with a little bit more Cocoa experience under my belt I feel like I have an inkling as to what might be going on. I'm making an application that is driven by a UINavigationController. In the AppDelegate, I create an instance of this class, using "page 1" as the Root View Cont...

How to stretch the image size in iphone UIImage or UIImageView

Hi I'd like to show the image in iphone, but the image too big. I'd like to stretch it to fit the iphone screen, I can't find any class to handle it. Any suggestion? Thanks. ...

Slicing up a UIImage on iPhone

Objective: take a UIImage, crop out a square in the middle, change size of square to 320x320 pixels, slice up the image into 16 80x80 images, save the 16 images in an array. Here's my code: CGImageRef originalImage, resizedImage, finalImage, tmp; float imgWidth, imgHeight, diff; UIImage *squareImage, *playImage; NSMutableArray *tileImg...