cocoa-touch

Resizing UIPopover and its UITableView programmatically

Hello folks, I have a UIPopoverController which loads with a custom controller which is a subclass of UITableViewController. It serves to present a number of suggestions, under a search bar. When my popover opens the UITableView inside it show as many rows as possible; the first ones show the choices I set up, the last ones are blank. W...

Replicating Style of Copy/Paste Pop-out.

How would I replicate the style of the Copy/Paste pop-out so I could put custom buttons inside it. I don't think it's a public class so how else would I do this? ...

App crashes when I rotate phone for the first time

App only crashes the first time i rotate my phone (EXC_BAD_ACCESS). Anytime after its all gravy. It only crashes on device too. Simulator everything is good. #import "ImageViewController.h" #define degreesToRadian(x) (M_PI * (x) / 180.0) #define ZOOM_VIEW_TAG 100 #define ZOOM_STEP 1.5 @interface ImageViewController (UtilityMethods) - (...

Vectorial PDF graphic elements on iOS

Currently implementing vectorial interface elements on iOS is very peculiar, UIImage advertises support only for raster formats but i am able to set a pdf file as the image of a UIButton in IB and it renders with good antialiasing, however the image is not visible on either iphone or ipad running iOS 4.x and 3.x, the only way to have it...

App loads images over wifi, but not 3g

I am having a really weird issue. My app runs great on wifi, all of my images load from the net. If i run the app for the very first time on 3G, images wont load. If I switch to wifi, then switch back to 3G, images will load (new images load as well as they change). I have no idea how to diagnose. ...

Call super before or after setting up view?

- (void)viewDidLoad { [super viewDidLoad]; //..do stuff.. } or - (void)viewDidLoad { //do stuff [super viewDidLoad]; ...

NSUTF8StringEncoding causes file to render improperly in TextEdit/Pages, but not BBEdit/vi

I'm running into a bit of a weird issue. Whenever I create a new text file in my iOS application, I set its encoding to be NSUTF8StringEncoding. If I edit the file and input any characters with diacritics and save the changes, the diacritics render properly in some applications such as BBEdit, TextMate, cat and vi but not in others suc...

I am creating iphone application. How to trigger an event when button click?

in xxx.h UIButton *b1, *b2, *b3; in xxx.m b1 = ---- similarly for b2 and b3 Now I want that on Click event I store the title in the string. How i can achieve it? In Other Words: What function/method would I have to implement in my View Controller class to handle a click event on a UIButton? ...

Is the Apple NSURLConnection Documentation Wrong?

// Create the request. NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.apple.com/"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0]; // create the connection with the request // and start loading the data NSURLConnection *theConnectio...

How to hide a UIButton title after onclick event.

When I click a button Its title should be hide. I do't want to set the title to empty string @"". So, How can i do this? ...

How to diagnose EXC_CRASH?

A tester sent this crash file: Not sure what an EXC_CRASH is. UPDATE: I can randomly replicate it on device (never in simulator) when rotating my phone. Here is my rotation code: // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfac...

viewDidLoad in an XCode Utility Application

I have some code that I want to run in a utility application whenever the main view is shown. I put the code in viewDidLoad, and it only runs when the program starts up. If I flip to the other view, and then flip back to the main view, the code doesn't run. So how can I get this code to run everytime the main view is shown? ...

Creating a new ViewController and xib for programmatic display (with addSubview)

I am writing a library to be used by developers for the iPhone (similar to the way that OpenFeint is implemented) and I am trying to create a ViewController with an associated XIB so that I can instantiate it in my code with SplashScreenViewController *splashScreenViewController = [[SplashScreenViewController alloc] init]; UIWindow *top...

What is the difference between UITouch and UIGestureRecognizer?

This may be a newbie question, but could anyone please explain the difference between UITouch and UIGestureRecognizer? ...

UIMenuController Custom Items.

I have created a UIMenuController and have set it a custom menu item like so: UIMenuController *menuController = [UIMenuController sharedMenuController]; UIMenuItem *item1 = [[UIMenuItem alloc] initWithTitle:@"Do This" action:@selector(item1)]; [menuController setMenuItems:[NSArray arrayWithObject:item1]]; But I wanted that object to ...

UINavigationBar autoresizing

In my app, I got a UINavigationController. Unfortunately, when I rotate the device and the interface orientation changes, the UINavigationBar doesn't change its height. In other iPhone applications, such as the Contacts.app, the navigation bar gets slightly less tall in landscape mode. It must be built-in, because if you take the navigat...

Movie Player Crashes Sometimes in Horizontal Orientation

MPMoviePlayerViewController* moviePlayerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:myChartlyObj.video_url]]; moviePlayerViewController.view.backgroundColor = moviePlayerViewController.view.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"st-screen.png...

How to force horizontal orientation?

I want to do the following: ViewControllerA should not go into horizontal orientation ViewControllerA pushes ViewControllerB ViewControllerB should go into horizontal orientation. Not sure what to set to make this happen. ...

bring touched views to the front layer in objective-c/cocoa touch

So what i want to do is when any given UIView is touched, and moved around the window, to bring that to the front and be on top of all other layers. is there a way to do this programatically? ...

How to solve the problem:"Expected specifier-qualifier-list before" in XCode?

Hi Guys, I met a problem in XCode. And my problem was similar to this one: http://www.iphonedevsdk.com/forum/iphone-sdk-development/40121-expected-specifier-qualifier-list-before.html So I want to know how to solve the problem in the link above? Thanks in advanced! Nick ...