cocoa-touch

Consequence of importing appDelegate in a class and the same class in appDelegate

Hi all, I want to know the consequence of importing appDelegate in a class and the same class in appDelegate. Because, I'm doing this in my application successfully, but it's recommended that it should not be done. I couldn't find the answer despite a lot of searching. Thanks in advance. ...

iPad keyboard appears in wrong orientation

I have a splitView Application that has a rootViewController and DetailsViewController When the application loads the detailsViewController pops a Modal viewController that contains a UINavigationBar. The UINavigationBar has a search bar on it (set programatically). When focus is brought to the search bar the keyboard pops-up. However...

Need color to build a custom UIButton to put inside a UIBarButton.

I need to build a custom UIBarButton. Most of what I have done works except that I can't get the color of my button to match the iPhone UIBarButton. How can I match it? Here is what I have: (mostly ripped from Elements sample project) UIButton *localFlipIndicator=[[UIButton alloc] initWithFrame:CGRectMake(0,0,50,28)]; self.flipIndicato...

Changing tint color of TTButton

Hey guys. Right now in my application, I have a TTButton. I am setting the color of the TTButton initially using stylesheet like TTCatalog. it's like [TTStyleSheet setGlobalStyleSheet:[[[CustomBadgeButtonStyleSheet alloc] init] autorelease]]; [code for initializing ttbutton here]; And then there is a class called buttonStyleSheet in t...

Strange behaviour of UITableView scrollToRowAtIndexPath:

I have to set an initial scroll position of my UITableView to a row other than the first one (for example, the first row of the second section). In my view controller's viewDidLoad I write: - (void)viewDidLoad { // self.view is a container view, not UITableView [super viewDidLoad]; [table scrollToRowAtIndexPath:[NSIndexPath...

Creating a "My Documents" browser like in the iPad iWork Apps

Keynote, Numbers, and Pages all have a top level "My Documents" browser where you can create, delete, and select for editing all of the documents you've created so far. I'd like to create a document browser like this for an iPad app, but I am not sure where to start. I've Googled and searched here on Stackoverflow, but I haven't found a...

How to increase DatePicker height in ipad?

How do I increase DatePicker height in iPad? Is this possible? And also one more doubt is, is it possible to increase the UITableView vertical scrollbar is more visible? (i.e I want to increase the vertical scrollbar width). Every time I load the tableview data, the first time the scrollbar is not visible. When I drag the tableview onl...

Iphone: UISwipeGestureRecognizer question

I see in the documentation that UISwipeGestureRecognizer is available in Iphone OS 3.2 and later. I was planning to use this to detect swipe gestures in my Application. What would be the consequences of running my application in an older OS say 3.1.3 if I do implement UISwipeGestureRecognizer? ...

How to add subview ontop of UITableView?

I have a UITableView that gets populated with data if there is a live network connection. When there is no connection I would like to add a view to the current view that will say No Internet Connection. Similar to the Photos app when there are no synced photos. I am not sure how I can accomplish this. ...

IPhone app as a web server, any advice?

I've seen several programs that do this so that one could copy files (that are generated on the iphone via some app) back to the PC. They do this by making the iphone app run as a web server that gives you an ip address. You just connect to this ip via some browser and then you have links to the files. What I'm wondering is how are they...

KML -> GPolygon -> MKPolyline?

So I've got a couple of (ginormous) KML's that I've successfully converted into 180 some-odd Google-Maps encoded polygons/polylines. Anyone have any experience or thoughts on how to take these and turn it into an MKPolyline object suitable for use on iOS4's MapKit? Here's what I'm looking at right now ..... var sw = new GLatLng(25.837...

Dismissing Modal View Controllers

View Controller A presents View Controller B modally, which has a button to present View Controller C modally. Here is my flow: A presents B which presents C When B presents C, I want B to be dismissed, so my only view controllers are A and C. I am not sure where to call: [self dismissModalViewControllerAnimated:NO]; in order to d...

How do I setup a reference variable to another variable/UILabel variable?

Let's say I have several lines of code to clarify specific settings on a given UILabel variable: numberMarkings[selectedBoxX][selectedBoxY][selectedSquareX][selectedSquareY][selectedNoteX][selectedNoteY].text = @"derp"; numberMarkings[selectedBoxX][selectedBoxY][selectedSquareX][selectedSquareY][selectedNoteX][selectedNoteY].cente...

why is my navigationBar under my status bar?

- (void)viewDidLoad { [super viewDidLoad]; [self setWantsFullScreenLayout:YES]; [mainScrollView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onMainScrollTap:)]]; } - (void)onMainScrollTap:(id)sender { if(self.navigationController.navigationBar.hidden){ ...

ABTableViewCell Height

I'm using ABTableViewCell by atebits: http://github.com/enormego/ABTableViewCell http://blog.atebits.com/2008/12/fast-scrolling-in-tweetie-with-uitableview/ The one thing I can't figure out is how to change the height of the cell. Due to the drawing method, I don't think it responds to the normal methods that I've found for changing the...

how can i add a Play button in toolbar of three20 app

How can i add/show “Play” button in the toolbar. In code “TTPhotoViewController.m”, i can see there is a method “playAction”, but i couldn’t find the way to activate that. could you please help me. Thanks in advance. ...

Cocoa Touch - iPhone App crashes when button is pressed?

This is my first app. It doesn't crash the simulator just brings you back to the home screen. This isn't my first cocoa program (I'm not a pro at cocoa either)just my first iPhone. It crashes when you press the letsPlayButton, which runs the -(IBAction)letsPlay:(id)sender; method. Help me! Im so lost with what's wrong! .H #import <...

How to Dismiss 2 Modal View Controllers in Succession?

I have 2 view controllers presented modally. A presents B which presents C. When I dismiss C I would like to dismiss B as well. But I am not sure how to do this: Dismiss C: [self dismissModalViewControllerAnimated:YES] //[delegate dismissB] //this doesn't work either when i create a delegate pattern Now I am left with B. How can I...

Manually rotating a UIView in response to orientation change? (Not AutoRotate)

I have an OpenGL view that I would like to manually modify and redraw in response to a device orientation change. How can I accomplish this? If I return YES from shouldAutorotateToInterfaceOrientation:, the system does its stock rotation animation, which I don't want. I just want to get a notification and then adjust my openGL scene to m...

presentModalViewController not working properly

I have 3 views. I want to do the following: A presents B modally A dismisses B A presents C modally I have setup a delegate pattern where A is B's delegate. This is how I am presenting and dismissing in B: [delegate dismissB]; //this is just [self dismissModalViewControllerAnimated:NO] [delegate presentC]; //this is just [self prese...