uikit

Strange delay with Navigation Controller behaviour

I have the following set up in a navigation controller. The root is a list of categories (banks, hotels etc) and each category has a child view below it containing a table view of items (Bank A, Bank B etc). When i select 'Banks' i see my banks (list coming from from web service), but then i go up one level to my root, and select 'Hotel...

How can I send two arguments in a selector method?

In the following, how can I send two arguments in togButton method? I tried, but it did not work. [button addTarget:self action:@selector(togButton:) forControlEvents:UIControlEventTouchUpInside]; ...

Can I limit the character set for a UITextField?

I have a bitmap font which which doesn't have every single character, such as accented characters (é î ü etc) or symbols such as "¥" or © which I'm using to display usernames in a Highscore table for a game. Is it possible to limit the UIKit keyboard to certain characters, or only allow certain characters in the UITextField? Or will I ...

Button background setting

This question is almost embarrassing to ask, but I can't find the answer in any documentation. I have a UIButton in a view. In IB, I set the button's background to a colour. The original rectangle in the Identity Inspector shows a half-black, half-white rectangle for the button's background. I can't find anyway to set the background ...

UIPickerView with Multiline UILabel

I'm currently working on a program that populates a picker view dynamically from my Core Data set up. I have everything working data-wise but the problem i'm running into now is formatting on my labels. The picker is presented with it's own toolbar in an actionsheet with a button on the right side of the toolbar. It's initial state is ...

iPhone UIToolbar UIButtonItem highlighting

I have subclassed UIToolbar and within it have created a set of UIButtonItems, all added in order and nicely spaced with flexible spaces. I now want to toggle one of the UIButtonItems each time it is tapped (just like the shuffle button in iPod, white blue white blue. I have maintained a reference to the UIButtonItem // interface UIBu...

UIScrollView offsetting content double the requested amount

The Issue My PSWSnapshotView's end up exactly snapshotIndex too far to the right inside the _scrollView (40px offset). Yet, they are set with their frame to have the first one at (0, 0), though that first one shows up at (snapshotInset, 0) instead :/. The Code - (void)layoutViews { CGRect frame = self.frame; CGFloat pageWidth ...

Custom init method in Objective-C, how to avoid recursion?

I want to create a subclass of UINavigationController which always starts with the same root controller. Nothing special, so (to me) it makes perfect sense to override the init method like this: - (id) init { rootController = [[MyController alloc] init]; if (self = [super initWithRootViewController:rootController]) { // do...

becomeFirstResponder on UITextView not working

For some reason, I'm having trouble with making a textfield the first responder. I have a UITableView with two rows. Each row has a label and a UITextField. The textfields are tagged kLoginRowIndex = 0 and kPasswordRowIndex = 1. As you might have guessed, I use this for setting login and password. If the user taps on the return button ...

Creating the Phone App's in-call view in iPhone

Hello guys, I'm trying to create this sort of "pop up action sheet" view similar to the in-call view in iPhone's phone app. I believe this is a custom view, since I can't seem to find this in any apple references. But somehow the Google app and Discover app both have this view and look awfully similar (I've attached the images below). ...

iPhone sdk Cocoa Touch - Pass touches down from parent UIView to child UIScrollview.

Hi, I have a UIView inside my xib in IB and inside that is a UIScrollview that is a small 80x80 square and dynamically loaded with 8 or so 80 x 80 thumbnail images. The UIScrollview is not clipping the images so that they extend out either side so you can swipe left and right to scroll a chosen image into the the centre, paging is on s...

iPhone UIKit prevents custom view controller hierarchies?

Can anyone explain why it's not possible to create your own view controller hierarchies using UIKit on the iPhone? Let me explain: when creating applications using a complex view hierarchy and navigation logic, it's a good idea to have certain views controlled by a dedicated view controller. These controllers can have their own subcontr...

How to change the size of the crop rect when using UIImagePickerController

I need to change the size of the cropping rect when using UIImagePickerController. In my case, I need the user to select images that are 320x385 but the crop rect currently only allows 320x320 (when allow editing is on). Any ideas? ...

UIWebView frame resize does not resize the inner content...

Hi, if I change the frame of a UIWebView (scalesPageToFit property is YES), what do I have to do that the zooming level of a currently displayed webpage persists? Let's say I have a UIWebView frame with a width of 200 pixels, and has zoomed into a website so that only one column is visible. After changing the width to 300, I still see ...

Using view.bounds to make boundaries

I'm working on a few basic apps/utilities/games with the iPhone to get a better grip on it. I currently have a setup where a CGRect moves wherever the finger moves, however I don't want the CGRect to go outside the bounds of the view. Original Method - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touc...

Blurry UILabel text in accessory view of MKAnnotationView

Hello there, I'm trying to add a UILabel to an MKAnnotationView as a leftCalloutAccessoryView right after a pin got selected for the first time in the MKMapView. Adding the label is not a problem: The callout gets selected and opens, and this is when I add the label to the callout view. The callout gets automatically expanded to the lef...

Is there a way to retrieve every responder that has handled a UITouch?

I'm trying to debug some touchesBegan/Moved/Ended related slowdown in my game; I think that some of my touch responders are not unloading properly, and so as the game runs on more and more of them stack up and the touches get less responsive because they have to pass through a larger and larger responder chain. Is there some way to vi...

Managing UIView layers and moving a view between view hierarchies

I'm gussying up a Cocoa-Touch UI composed of basically two view hierarchies. Users need to drag objects from one (hierarchyA) INTO the other (hierarchyB). The problem I'm having is with the layering of these views, especially as they're being dragged. I don't know of a way to allow parts of hierarchyB be layered below a UIView from hiera...

UIDatePicker graphical glitch

I'm experiencing a bad looking graphical glitch with UIDatePicker, and I'm wondering if anyone else has seen and/or resolved it. It is something non-deterministic, because every once in a while it goes away and looks normal. Check out the highlight and shadow bars are shifted... I have tried removing all other graphical elements. I...

How to call a scene from a UIviewController in Cocos -2d

I have problem when placing a UIViewcontroller over a menuScene. my UIviewcontroller(named "share") consists several button like submit,play again,main menu etc. But the problem is that as this UIviewcontroller class reside over menuScene sometimes clicking on UIViewController page execute menuScene menu like (startgame,help,credit etc...