cocoa-touch

Create a clickable image map on iPhone

Hello All, I wanted to create a clickable map for the United States, when user select a state it will be highlighted and display another detailed view.Like the following web application. http://www.usflashmap.com/samples/real-estate-map/index_ext.html I would appreciate any suggestion on how this can be achieved on a native iPhone a...

iPhone/iPad UIScrollView subview orientation and setAutoresizeMask problem

Hi, I have a UIViewController that is being pushed via a UINavigationViewController. The viewController's view has a UIScrollView as a subview. I'm initializing the UIScrollView with the same bounds as the viewController's view bounds and set the auto resize mask to flexible height/width so it will still occupy all the screen. This work...

Managing a large number of expensive UIViews in an UIScrollview

The iPad app I am designing is going to show a full screen UIScrollView allowing the user to flick through a large number (200 or more) of images - all the same size, no paging. The images are to be loaded from the web and don't have a predefined ordering. Right now what I do is I load and parse an XML feed which contains references to ...

I've updated my iPod touch to 4.0 and now I can't run my app on it (details inside)

I can't run my application after upgrading. I've downloaded the 4.0.1 yesterday and restored my iPod to 4.0 today... It doesn't make sense. Did anyone had this problem with his iPod? Look at what the organizer tells me: The version of iPhone OS on “BFipod2” is too old for use with this version of the iPhone SDK. Please restore the dev...

Array is empty after function

Hello everyone, I am newbie with Cocoa Touch, I have a problem that I try to figure out. I will appreciate if anyone could help. I would like to create a tableDataList to display on the table. AsyncViewController will call TableHandler fillList method to initialize table data. But after fillList call, the tableDataList return empty. C...

how to add custom animation while presenting view controller modaly + iphone

Hi folks, I want to know how to add our custom animation while presenting or pushing the view controller (modally or navigation) which out the apple predefined animation. Thanks in advance... ...

any Good Article/Tutorial which can guide to insert data to database Using JSON in iPhone

Hi guys. I am developing an iPhone application in which I want to insert data into Web-server. some of my friends told me that JSON is best way to do this. Can anybody send me the link of any article/tutorial/blog which elaborate the use of JSON for inserting Date into remote database. I have found some tutorial but they are just showin...

How do I trigger a reload in an NSFetchedResultsController without changing the fetched object?

In my iPhone app, I have an NSFetchedResultsController showing User objects in a UITableView. The User Objects have 0-many Log objects. A summary of the Log objects are shown together with their User object in the UITableView. My app uses a tab bar, so user input in the logging tab require that the user tab's NSFetchedResultsController ...

How to retain a plist file in memory

I'm loading a plist file using a slightly tweaked version of the example in the developer docs - (void) loadPlistIntoMemory { NSString *errorDesc = nil; NSPropertyListFormat format; NSString *plistPath; NSString *rootPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0...

Content touch handling in UIScrollView

I've got to deal with UIWebView embedded into UIScrollView. How do I handle the link touch, for ex. ? ...

Segmented Control to Swap ViewControllers in a Navigation Controller

Here is the setup of my iPhone App: I have a UITabBarController that has 4 View Controllers (1 UINavigationController & 3 UIViewControllers). Onload my app is defaulted to the UINavigationController, where there is a grouped UITableView which gives two navigation options, when the user hits the first option the relevant UITableViewCont...

Resize NSData to set into UIImage

Hello everyone, I have these codes: UIImage * img = [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:IMAGEURL]]]; [self.imageView setImage:img]; But the IMAGEURL contains a high resolution picture so it takes much time to load. Can I resize the image data smaller to load faster? Any help will be appre...

removing/stopping a specific mkAnnotationView from being reused.

Hi all, I've been playing around with the MapKit and came across a puzzling scenario that i'm not creative/knowledgable enough to work my way around of. In my map application, I have a mapView that I would like to drop pins onto. My dilema arrises from the fact that mapView reuses it's annotationViews. what I would idealy like to do, is...

UIPickerView - changing component width

In my iPhone app I want to have a UIPickerView with 2 components. Initially the left column will be wide and the right column narrow to enable the text on the left to be read easily to allow selection from it. Once this column has been selected the user will click on the right column to select an item from it : when this happens I want ...

init is being called and I don't know why?

I am working on the iTuneU Stanford iPhone course HelloPoly drawing assignment, and I am getting a call to my object's init routine when I don't expect one. The callback seem to indicate that the call is coming from _loadMainNibFile (after other calls). What I am trying to understand is why is my object being init-ed implicitly. The sour...

UITableView Change 'No Results' Message

Given a UITableViewController with a UISearchBar, how does one change the 'No Results' text that appears in the table view (after any characters are entered) to something like 'Search by Name'? The reason is that the search in question is performed remotely (and has about a second delay), so I can only perform the search when the user se...

Xcode: Show downloaded .txt content in label?

Probably really a rookie question here about xcode (for the iphone).. When I issue this command; NSString *externalData = [NSData dataWithContentsOfURL:[NSURL URLWithString: @"http://blah.com/userlist.txt"]]; I can see it's download from my webserver. How can I make this 1 line show in a label? I tried; label.text = externalData; [e...

UIAlertView with two buttons in iPhone

Hi, I'm trying show an alert view when a button was pressed, so I wrote code as follows: - (IBAction)signUpComplete: (id)sender { UIAlertView* alert_view = [[UIAlertView alloc] initWithTitle: @"test" message: @"test" delegate: nil cancelButtonTitle: @"cancel" otherButtonTitles: @"OK"]; [alert_view show]; [alert_view release...

NSFetchRequest setFetchOffset in NSFetchedResultsController

I'd like to know if I should expect setFetchOffset to work in an NSFetchedResultsController. Given a UITableView that displays rows like this from an NSFRC: 1 2 3 4 5 I expected that adding this line: [fetchRequest setFetchOffset:1]; e.g. line 207 here: http://github.com/mandersen/FetchOffsetCase/blob/master/Classes/RootViewControll...

presentModalViewController doesn't rotate properly in iPhone / iPad

Hi all... I have a viewController called MainViewController, which has a UIButton. When tapped, this button loads another viewController, called ModalSelector like this: - (IBAction)showModalSelector:(id)sender { ModalSelector *modal = [[ModalSelector alloc] initWithNibName:@"modalSelector" bundle:nil]; modal.modalPresentationSty...