uicontrol

How to make the "hot area" of a UIControl bigger?

Or: How to expand the sensitive area for a UIControl without just making the view bigger? I have a pretty small button image (a little arrow), which is just 10 x 10 pixels. Too small for touching. I want the "hot area" to be 50 x 50 around that. For learning, I want to know how to do it manually, even if I could use some of the provided...

How can a covered UIControl or UIView still know about if a touch ended over it or not?

I have a UIControl (or UIView, could have either of them, doesnt matter), and this is covered by another UIControl. The other UIControl reacts nicely on touches. But the underlying UIControl also needs to know about the touch and if the touch was actually "on it" or not (from the user's perspective). The covering UIControl is partially t...

How can a UIControl pass all touch events on to the next object in the responder chain?

That's tricky. I have a small button over a very big one. When the small button on that big button is pressed, the small button does something. But the big one does nothing. Of course. But now I want that the big button also does something, no matter if the small button was tapped or not. So the small button has to forward all touch even...

Can't figure out where to start subclassing a UIControl!

Hi there, I want to create my own control that will consist of several UILabels and a couple of UITextFields. The problem is I'm not sure where to start! Do I directly subclass UIControl, then create my subviews and add them to the main view in init:? Or do I use layoutSubviews? And will I need to override drawRect:? I'm used to creati...

UIControlEventTouch...?

I have a grid of images/buttons, and I want the user to be able to drag their finger over the images/buttons such that when their finger touches each image/button an event is called. How do I do this??? The best example I can think of now is the Contacts app, how you drag your finger down the list of letters (on the right) and as you t...

UIControl - changing assigned selectors: addTarget & removeTarget

I'm using 10 buttons in my interface and need, from time to time, to change the button's selector. Am I required to use: -(void)removeTarget:(id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents before I change the selector or can I just use: -(void)addTarget:(id)target action:(SEL)action forControlEvents:(...

Date Picker / calendar UI Component with draggable date ranges

I'm looking for a datepicker control (HTML + JavaScript / Flex) that allows selecting a range of dates by dragging along the calendar dates (just like in Google Calendar or Outlook) It can be open source (preferable obviously) or commercial, and should be server technology agnostic. Outlook date range selection Google calendar d...

Recreate scope bar of UISearchBar

I want to recreate the scope bar of a UISearchBar, just for use as tabs. I'd like to adopt the UISearchBar scope bar's style. I've thought about Quartz 2D to draw these tabs in combination with UIControl for managing the different states of the tabs. What are you thinking of? ...

Custom UIBarButtonItem with quartz

Hi! How can I draw a button with quartz that has exactly the same style as a UIBarButtonItem. The button should be able to show different colors. I downloaded the Three20 project, but this project is really complex, you'd need a lot of time to overlook the whole framework. I just want to draw a custom UIBarButtonItem. Thanks for help. ...

How to disable the highlight control state of a UIButton?

I've got a UIButton that, when selected, shouldn't change state when being touched. The default behaviour is for it to be in UIControlStateHighlighted while being touched, and this is making me angry. Suggestions? ...

How to darken a custom UIButton

Hello! I've subclassed the UIButton class and now a custom view will be drawn using quartz 2d. It all looks fine, but how can I darken the button at clicking it. How can I set the views for the different states if I am using quartz in the same class to draw the button? Thanks for your help ...

mixing OpenGL and Interface Builder/ UI Controls - bad idea? Why? (iPhone)

I've heard that OpenGL ES and standard iPhone UI controls don't play well together, but I'm wondering if anyone knows why, and what the effects are? I'm writing an OpenGL based game, and the view is loaded from a nib file with ui controls, and it seems to work ok, but the game is really simple at this point... does using ui controls cau...

Clipping/Masking UISearchBar (or another built in control)

I'm trying to clip/mask a UISearchbar as seen in the image. I know it's possible to clip views in general, but I was having some trouble doing it with a built in control such as this one. Any help would be appreciated. http://dl.dropbox.com/u/1006208/clipped_searchbar.png ...

Why is UIControlTouchUpInside UNDEFINED?

I've got a simple question but it has got me confounded. The code below gets an UNDEFINED error for UIControlTouchUpInside. What do I need to include or import? If I comment out the line, it works. So that means forState:UIControlStateNormal is defined. I'm new so hope you can help. UIButton * button = [UIButton buttonWithType:UIButtonT...

How to highlight the button untill the next view is changed in iphone?

Hi Buddies, I have created five buttons in the view controller. If i clicked the button it goes to the corresponding view. Now i want to display the button in highlighted state when it is clicked. It should go back to the normal state only when i click the other button. I have set the another image for highigthting buttons when i click...

Need help identifying Windows UI control

Can anyone identify the control that is being used to create the accordion-style tab layout in this Windows dialog? http://code-industry.net/images/imageprinter_pro.png ...

UIButton not firing selector if I draw it using CALayer

Hi everybody I create this button like this: _myButton = [[UIButton buttonWithType:UIButtonTypeCustom] retain]; DLBadgeLayerDelegate *layerDelegate = [[DLBadgeLayerDelegate alloc] init]; _myButton.frame = CGRectMake(0.0 , 0.0, 100.0, 100.0); [_myButton addTarget:self action:@selector(myButtonTapped:) forControlEvents:UICon...

How do I have my UIViewController respond to a non-touch event?

Working with iPhone SDK 3.2 -- I have a complex custom UIControl that handles touches on the child controls. In certain cases, I want the parent UIControl to pass an event to the UIViewController, which will then take action outside the control. How do I do this cleanly? Thank you! ...

Can I perform animations on a UIControl subclass with iPhone SDK 3.x?

I have a custom UIControl that passes UIControlEventValueChanged events back to my ViewController. I also need to animate it (basic resizing) in certain circumstances, but UIControl seems to have no implementation of beginAnimations or commitAnimations. Do I have to encase it in a UIView? Any better solution? Thanks. ...

iPhone UIControl and Subview

I currently have a UIControl, which has a number of subviews (image, label). Unfortunately when I use addTarget etc. It doesn't detect touches on the subviews. [myCustomView addTarget:self action:@selector(touchedView:) forControlEvents:UIControlEventTouchUpInside]; Is it possible for the UIControl to detect touches on...