cocoa-touch

a simple core data save problem

I started learning core data and I wanted to do a simple category->object->detail application. I started with the location tutorial. After I've done it, I moved all the auto-generated code from my appDelegate to a new DataProvider class and i put a tabbar at the beginning of the app. So I have a TableView tabbar item (with a navigation c...

How to know the type of a variable in Objective C on Iphone?

For example if I have a function sort() like so: + (void) sort: (id) a { if(typeof(a) == 'NSArray') { ... } } So is there anything in Objective C for Iphone which can go in place of typeof() so that I can detect beforehand what kind of variable am I dealing with? ...

how to reload table view in iphone

hi i have create dynamic table in my program .its run on simulator is very well but i have build the iphone program run but problem is that when touch iphone screen table data reload. any suggestion pls. help me thanks ...

Building custom view controllers based on the UIScrollViewController for the iPad

I've been eying the E*TRADE iPad app (visible at http://www.apple.com/ipad/apps-for-ipad/#etrade) and wondering just how they manage to effect a 'carousel of view controllers'. Clearly there's a UIViewController under the covers ... but beyond that I get quite lost. It's pretty much a UITableView on it's side. Is there any sample code ...

How to capture application inactivity Time in iphone

In my application i want to set inactivity timeout (IdleTime). How can i set this? Is there any way to monitor all events in myappdelegate? For eg i have two UIViewController classes. when i click one control in UIViewController1 or UIViewController2 it should be monitored by myappdelegate ...

xib-specified location moves on UIView load?

I have a couple of view controllers that I want all to share a header status bar. This header view shows status of certain things in my app. I used IB to lay out the contents of the header view in its own xib, then also used IB to layout the view controllers, adding a placeholder UIView element in the view controller's xibs for when I lo...

UIProgressView progress doesn't updated

I have a UIProgressView added to self.view as subview. I have a UITableView with rows loaded. I need image in every row but I don't want the app to wait for all of them, so I decide to run NSThread with loading images process. When I try to update progress of the UIProgressView from inside my thread - it doesn't get updated. Do I need t...

UI freeze with animated removal of UIScrollView subview

In my iPhone app I have a UIScrollView with custom content views. At some points, a custom popup view is dynamically added to the content with a zoom animation on appear and disappear. I'm using block-based animations with a completion handler that calls [self removeFromSuperView] as follows: - (void)dismissPopup { CGRect rect = sel...

Iphone: Passing objects and Multiple threads

Hi, Im having some trouble passing an NSNumber object to different threads. I call a function on viewDidload that loads up some objects from core data as a background process. which calls another function which loops through the loaded objects to see if there are any images associated with it alredy downloaded. if its not present, downlo...

iphone app communication without using webservices

I want to send some Text plus a image from one iphone application to other iphone app but restriction is I should not use a web server in between communication,Is there any way to fulfill it ? Details: There are two independent devices and could be far enough say out of network. My requirement one app adds some text with a image and ...

NSTimer not invalidating or is refiring

so here is the problem i have, i created two NSTimer objects and they are fired when i button is pressed. then the user has 20 seconds to press another button which forces an alert to popup where they enter a validation code, and when they press the confirm button on the alert it is supposed to stop the timer. what is happening is that ...

Can you access the actual identifier from an enum element's numerical value?

Is there a method to return the identifier string for a given element's numerical value? For instance, logging a UITouch's phase returns an int, but having the actual string value would be easier to read. I suppose I could write my own switch statement to do this, but I'm hoping there's a built-in means. ...

UIAlertView Delegates

Can someone explain how the delegate to a UIAlertView works? Is it automatically called or do I have to call it? Eg: - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex ...

Can I use instance variables with an NSManagedObject?

So I got entities Level and Tile. Level has a to-many relationship with Tile. Tile has a property 'index'. Right now I'm using this code to get the tiles array of Level sorted: - (NSArray *)sortedTiles { NSMutableArray *sortedTiles = [NSMutableArray arrayWithArray:[self.tiles allObjects]]; NSSortDescriptor *sortDescriptor...

Getting an object from an NSSet

If you can't get an object with objectAtIndex: from an NSSet then how do you retrieve objects? ...

objective-c/cocoa-touch - comparison between two NSStrings failing even though they are identical

i have an if statement comparing two NSStrings, one is user input from a UITextField the other is a NSString created from random integers between 0-9 inclusive, however the comparison is failing everytime even thought they are the same which is shown in the log from an NSLog call. so can anyone see anything i'm doing wrong in the supplie...

How to return an NSMutableArray from an NSSet

I'm able to put the contents of an NSSet into an NSMutableArray like this: NSMutableArray *array = [set allObjects]; The compiler complains though because [set allObjects] returns an NSArray not an NSMutableArray. How should this be fixed? ...

Creating my own file extension based on plist

Hi My application handles with files of type *.mndl which is not more than a customized *.plist. Up until now I've been using *.plist files but now I want to associate the extension and be able to open *.mndl files from any other app I have realized that renaming file.plist to file.mndl does not work. (Hence, I don't even know if I did...

Multiple NSURLCoonections in same View using iphone sdk

Hi, Can any one of you post the code snippet, example tutorial on handling the multiple NSURLConnections from the same viewController using cocoa Touch framework.... Thanks for all your future help..... ...

Ipad device orientation problem

Hi, I am presenting MFMailComposeViewController(mailController) using presentModalViewController on my UIViewController, In mailController(subclass of MFMailComposeViewController) class i have overhide shouldAutorotateToInterfaceOrientation as - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation ...