uikit

How to enforce horizontal scrolling on UITextView?

I have a UITextView and I would like to only allow it to be scrollable horizontally only. Basically when the UITextView word-wraps I want the user to have to scroll horizontally to be able to view the rest of the contents. ...

Why does addSubview load the view asynchronously

I have a UIView that I want to load when the user clicks a button. There happens to be some data processing that happens as well after I call addSubview that involves parsing an XML file retrieved from the web. The problem is the view doesn't show up until after the data processing even if addSuview is called first. I think I'm missing s...

UISegmentedControl - how to toggle between 2 UITableViews

I have a tab bar based application. What is the best way to toggle between 2 different UITableView views? Should I use a wrapper view and add those 2 views to it and depending on which segment was chosen I will show the correct view? Using only one tableView will not work because the layout is different between those 2 tableviews. Th...

Adding view on StatusBar in iPhone

Hi All, Is it possible to add a UIView on the staus bar of size (320 x 20) ? I dont't want to hide the status bar , i only want to add it on top of the status bar. Thanks ...

Attempting to set a view's property results in an error: Request for Member … not a structure or …

I've declared a property in a view (created by interface builder, if it matters) and am trying to set the value from the view's controller – like so: self.view.url = someURL; That gives this error: Request for Member 'url' in something not a structure or union I have included the header for the view in the controller's .m file, but...

How do I switch between Navigation Controllers?

Situation: I have an Xcode project based on the "Navigation-Based-Application" template. So that means I have a SINGLE UINavigationController that manages a UIViewController. What I want To Do: What I want to do is add one more UINavigationController to my project -- and be able to switch back and forth between them. (I want to do this...

Is it possible to have multiple tab-bar controllers in an app?

I would like to design an app that has a RootView with 4 buttons. Clicking on each button will load another view that has its own tab-bar controller. The tab-bar controller for each of the views is different. If so, how do I go about implementing this? ...

iPhone game audio and background music

Have a few questions related to adding sounds to my game, specifically intro music (for splash), background music (loop) and button event sounds. Hope you can share your knowledge on this. 1) Should I use compressed sounds or uncompressed sounds? Or perhaps a combination of the two? Are there any limitations on the iPhone hardware that ...

What's CFRunLoop?

I would like to understand run loop more in-depth than what the reference provides. Is there resources out there that discuss this in greater details? ...

Button Width, height

What is the best way to go about changing the dimensions of a UIButton at runtime? Width? Height? ...

KVO on the "windows" value of UIApplication?

The following is not working: [[UIApplication sharedApplication] addObserver:self forKeyPath:@"windows" options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld) context:NULL]; Together with that, on the Observer side: - (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)chang...

Can't set background colour for UIView from ViewController

I have the following code in the view controller: - (void)viewDidLoad { [super viewDidLoad]; ThemeManager *themer = [ThemeManager sharedInstance]; UIView *theView = self.view; UIColor *forBackground = [themer backgroundColour]; [theView setBackgroundColor:forBackground]; } but when execution gets to the setBackgroundColor line...

How is the iPod app on the iPhone designed?

Is it just a tab-bar controller that loads some UITableViews that has navigation items set? Or is it a tab-bar controller that is loading a navigation controller? ...

Extend PickerViews Component while touching

I have a UIPickerView with a variable number of components to display. In its contoller i have this -pickerView:withForComponent: - (CGFloat)pickerView:(UIPickerView *)pv widthForComponent:(NSInteger)component { CGFloat f; if (component == 0) { f = 30; } else { if ([componentsData count]>2) { f =...

UITextView inside UIScrollView is not First Responder

I have a UITextView on a View that becomes the first responder. When I embed the UITextView inside of a UIScrollView in Interface Builder the UITextView is no longer the first responder. I am not sure what has changed? I would like the UITextView to become the first responder. - (void)viewDidLoad { [super viewDidLoad]; [scroll...

How to make half curl animation in iPhone like the maps app ?

Hi All, I am using the following code for page curl animation [UIView beginAnimations:@"yourAnim" context:nil]; [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:yourView cache:cacheFlag]; ... [UIView commitAnimations]; Is it possible to make the half curl animation like the maps.app on iphone/ipod ? Any ideas ho...

Is the UIDatePicker really the best iPhone UI mechanism for selecting dates?

Hello! I'm diving into iPhone/iPad development and I'm trying to find an elegant mechanism for allowing the user to select dates. It seems to me that a calendar control would be the best way to go, but I don't see one in anywhere in the SDK. All all I see is this overblown, the-price-is-right-looking DatePicker control. Is this th...

How would I go about building a calendar UI control for the iPhone/iPad?

Hello. There are a few different 3rd party code frameworks that include calendar controls, but most of them have a lot of functionality I don't need, plus most of them lack sufficient documentation on how to use them and I'm not a proficient enough iPhone developer to figure it out using just the code. So I'm going to attempt to build ...

UIWebView scroller object type

Hello, I need to access the scroller object of an UIWebView, so I do something like this : id obj = [[webView subviews] objectAtIndex:0]; The problem is that the object returns is not the same in SDK 3 and SDK 4. In 4, it returns an UIScrollView object. In 3, it returns me an UIScroller object, the problem is that this class isn't do...

Can tapping next textfield trigger same behavior as "Done" key?

I've got two textfields in a row for username and password. When you're finished putting in your username, the most natural thing to do is to just tap on the next textfield, like you would with a web form. But that doesn't work -- you can't edit the next field until you press "Done" on the keyboard for the first field and then tap on t...