cocoa-touch

UIImage Fade in after load on my UITable

I have an UIImage that loads from the web, and I'd like it to fade in when it displays in my UITableCell. if([thumb image]) { UIImage *imagen = [thumb.image retain]; [imagen drawInRect:CGRectMake(15, 4, 44, 44)]; [imagen release]; } How could I achieve it? ...

NSXMLParser and Geonames

I'm trying to parse a call from Geonames with NSXMLParser in the iPhone SDK. I've used this before but for some reason I'm getting an empty dictionary back even though I get results back in a web browser. Can someone please point out what I may be doing wrong. Below is the code I'm using and the results that comes back pasting it in a b...

Can't compile code when working with CALayer

For some reason I get linker errors when I try and use CALayer: "_OBJC_CLASS_$_CALayer", referenced from: I have imported the following headers: #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #import <QuartzCore/QuartzCore.h> Code: arrowImage = [[CALayer alloc] init]; ...

How can I consolidate deferred/delayed calls in Objective-C ?

I'd like to ensure that certain maintenance tasks are executed "eventually". For example, after I detect that some resources might no longer be used in a cache, I might call: [self performSelector:@selector(cleanupCache) withObject:nil afterDelay:0.5]; However, there might be numerous places where I detect this, and I don't want to be...

Why does navigationItem.titleView align left when presentmodalviewcontroller called?

I'm using a UILabel for the titleView of a navigation bar (I'm making simple in-app web browser). It works fine, except that when I present a modal view controller, the titleView shifts from the center of the navbar to the far left (underneath the back button). I've tested in 3.0 and up. Here is relevant code: - (void)viewDidLoad { ...

iPhone UIView Animation Disables UIButton Subview

So I've got a problem with buttons and animations. Basically, I'm animating a view using the UIView animations while also trying to listen for taps on the button inside the view. The view is just as large as the button, and the view is actually a subclass of UIImageView with an image below the button. The view is a subview of a container...

Problem adding data to NSMutableArray

I'm trying to add the value playerhight, among other values to NSMutableArray, but it won't let me build and I can't figure out why. #import "iGameViewController.h" @implementation iGameViewController @synthesize player; int playerheight; NSMutableArray *location = [NSMutableArray arrayWithCapacity:3]; -(IBAction)up;{ playe...

Using CGPoints in an NSArray

I have been trying to create an array stating the location of a UIImageView in an app I've been working on. What I am trying to do is by using an array I can store the location of my "player" image by using its x,y and z coordinates. The script I am trying to accomplish would look like NSArray *location[3]; -(IBAction)startup;{ [locat...

Can a UINavigationController contain a UITabbarController?

I want to have a UIView inside of a NavigationController that has 4 buttons. Clicking on any of these 4 buttons will push a UITabBarController that contains a NavigationController with a respective UIView. Is this possible? Tweetie seems to do something similar. ...

What is the difference between UITabBar and UITabBarController?

What is the difference between UITabBar and UITabBarController? When is it more beneficial to use one over the other? ...

UITabBarController does not appear in view

I have a UIView that is pushing a UITableViewController that is contained inside of a UITabBarController. #import <UIKit/UIKit.h> @interface ARViewController : UITableViewController<UITabBarControllerDelegate> { IBOutlet UITabBarController* tabBarController; } @property(nonatomic,retain)IBOutlet UITabBarController* tabBar...

Is it possible to get the More Tab Item with a UITabBar?

Is it possible to automatically generate a More button with a UITabBar when there are more than 5 on screen? UITabBarController can do this, but I would like to use the UITabBar. ...

How to add a subview to a UIViewController?

I am trying to add a UITabBarController to a UIViewController: [self.view addSubView:tabBarController.view]; I get a warning: warning: 'UIView' may not respond to '-addSubView:' How can I add a UITabBarController to my UIViewController? ...

How to set view outlet?

I have a UIViewController that contains a UITabBarController which is loading a UITableView from another nib. The TableView view is set to files owner. How can I set the view property in the UIViewController that contains the UITabBarController? ...

UITableView throwing exception

I am getting the following error on a very simple UITableView: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x5d73210' Here is my code: #pragma mark - #pragma mark Table view data source - (NSIntege...

UITableView how to implement loadNext/loadPrev to limit number of rows displayed

if a UITableView is used to show potentially thousands of items and we want to limit the number of records displayed at a time (sort of pagination but for UITableView), is there a way to create a loadPrevious button? I have seen a few implementations of loadNext, but what about loadPrevious? specially when we don't want UITableView to sc...

Adding UIPickerViews to a view with other elements

Newbie Cocoa Touch question: I'm aiming for an interface with a UIPickerView and a UIButton. The picker needs a delegate and dataSource, which I originally wrote as a separate PickerController class implementing the right protocols. However, I'm now unsure as to how to use interface builder to link everything up. If I have a separate ...

Play podcast frm within your application iphone sdk

Hi all, Can anybody point me to a tutorial/example code which embeds a podcast from a url into my application? Thanx in advcance. ...

Do I really need always a bidirectional relationship in Core Data?

Example: If I had two entities Person and Car, and each of them should be linked with an Image entity - how would this have to look like? Right now, I would make just three Entities: Person, Car, Image. So persons and cars can link to an Image entity. They have a 1:1 relationship to the Image entity. But now, a Core Data dude said that...

Load different initial view based on application preferences?

I have a preference that, when set, forces my application to perform some synchronization on startup. Can I use IB to display a different initial view based on this setting? Is there a standard way to enable this behavior? ...