cocoa-touch

How to add an UISwitch to a grouped table view?

What is the easiest way of creating an UISwitch inside a grouped table view without using a Settings Bundle? Is it possible to do it using Interface Builder without programmatically adding the switch? The desired appearance is like this apple example. ...

Cocoa Touch - Changing tex attributes?

How can I change a textview font and font size.. I've tried this but it doesnt seem to change anything... typingText.font = [UIFont fontWithName:@"Marker Felt Thin" size:64.0f]; Thanks! ...

Subclassing UITableViewCell correctly?

What is the difference between adding the subview to self and or to the content view? Subview added to self - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { UIImage *img = [UIImage imageNamed:@”lol.jpg”]; UIImageView *imgView = [[UIImageView alloc] initWithImage:img]; [self addSubview:imgVi...

Cocoa Touch, which to use: Window Template or View Template?

I have another issue related to Views, and i've ended up here dealing with Views and Windows in general. My understanding of all the fundamentals of iPhone development has been turned upside down. Can somebody explain, or point to a reference, the difference between these 2 templates? Ex: My app doesnt show a Window in the Interface B...

How do I append text to an existing XML file without rewriting the entire document?

I have a large amount of data in an XML file, and I'd like to append data to this file without rewriting it every time. I already know how to write the entire file out, but I'm struggling with how to append data to this file. Do you have a suggestion for how to do this? ...

How to have multiple delegates for an object without giving the object too much domain knowledge?

The setup: I have a singleton data access manager object, call it Manager. I also have some view controllers, call them Apples and Oranges. Both Apples and Oranges use Manager for some shared data model/access functionality. I would like Manager to call either of them back in certain cases according to something like this: if (someCond...

can my app get rejected if a tableviewcell doesn't highlight?

I am not highlighting my uitableview cells when they are selected, but they contain clickable links which shows a new view. is this ok? ...

iphone: interactive vectorial drawing

Hello, I am wondering the best way to have an interactive vector drawing on the iphone. It will be a map which will change depending of actions done on special area of the map. Thanks in advance for your ideas :) ...

NSURLRequest requestWithURL: only works on device after I've visited a page in Mobile Safari

I have the following code: NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.lenzerheide.com/modules/weather/iphoneweather.php"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval: 10.0f]; [[NSURLConnection alloc] initWithRequest:request delegate:self]; When I test the app on an iPhone...

Calling @property accessor?

I wonder if someone can explain the following, are these both doing the same? As both call "setSeparatorColor" I would guess they are both calling the accessor for the property. [myTableView setSeparatorColor:[UIColor orangeColor]]; . [[self myTableView] setSeparatorColor:[UIColor orangeColor]]; Gary. ...

Question's about delegate an UIScrollview.

Hello, i've got still problems with delegating something like a UIScrollView. For example, i've got 2 Scrollviews (Scrollview1 and Scrollview2)and i want to use the method - (void)scrollViewDidScroll:(UIScrollView *)scrollView1 To interact to both Scrollviews like: if (scrollView1 == scrollView2) { NSLog(@"similar");} First,...

Call method in nested parent controllers

I have a UIViewController that has an UIPopoverController that has an UINavigationController then a UIViewController. How can I from the child UIViewController call a method (eg. -(void)update) in the parent UIViewController? tried many combinations but still didn't work. ...

settings things to nil in viewDidUnload()

What is the purpose of setting things to nil in the viewDidUnload() method? I know it has something to do with releasing memory, but I thought that's what release was for in the dealloca() method. How do you know which things to put in viewDidUnload() to set to nil? ...

UITextField setAutocapitalizationType wonky behavior

I've got two XIB-generated UITextFields that I'm conditionally configuring in -viewWillAppear: as follows: //Configure text fields [emailField setDelegate:self]; [emailField setKeyboardType:UIKeyboardTypeEmailAddress]; [emailField setAutocapitalizationType:UITextAutocapitalizationTypeNone]; [emailField setAutocorrectionType:UITextAutoco...

How can I add a UIGestureRecognizer to a UITableViewCell subview?

imgView is a UIImageView that is added as a subview to a custom UITableViewCell class. The action isn't being called when the image is tapped. [imgView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(openMedia:)]]; ...

Get iPhone to Vibrate.

I've been trying to make the iPhone Vibrate using this code: AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); But is not working, could it be because I am playing sound at the same time as calling this? ...

UIActionSheet Like Button.

How could I create a button that looks like the button in a UIActionSheet, as apple have done sometimes in their apps. ...

Update UITableView using threads

Hi guys, I am creating a dictionary application for iPhone that gives result while the users are typing. I use threads (NSThread) to update the UITableView so that the main thread is not blocked. However, a crash happens when the UITableView asks the data source for the number of rows ( tableView:numberOfRowsInSection:) and I return, s...

Problem with popover overlaying some of my component

Hello, I'm using a popover to display information about the object the user clicked on. The problem is that sometimes this popover goes on top of a graphical component that need to stay visible. The solution would be to tell my UIPopverController to be displayed strictly inside a specific zone even if the anchor point is at the border...

Aliasing issue with PDF inside UIScrollView

I have a UIView subclass which displays a PDF, and this is embedded in a UIScrollView. When the user zooms in, the PDF content is pixelated. I've double checked, and anti-aliasing is enabled. If I display the PDF at a larger size using CGContextScaleCTM, it displays fine, but I don't know how to integrate this with the UIScrollView zo...