I tried to include a custom button programmatically inside a UIView which is a subview of UITabBarController.
The button is displays fine but when I click it, it crashes without an error message. Its strange that sometimes it does inconsistently:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFSt...
Hi, I'm trying to animate a UIButton to move up the screen. At any point the user can touch it. However, it doesn't seem to respond to touches while moving, only at the start and end of its animation. I guess this is because the button itself isn't moving, just the image of it. Any ideas how I can solve this? Here's my code so far. Thank...
Hi,
I'm writing a class that implements a piano keyboard. Right now it's just a UIView and each key is a UIButton. I'd like the user to be able to drag their finger and hit several keys, but right now it only registers touch down. I've added UIControlEventTouchDragEnter as a way to trigger the key event but it only works if you hit a ke...
Hi All!
I have a view with several buttons that all have the same target and action.
At the moment the action is @selector(doSomething).
I need to be able to determine which button is pressed but I'm not sure of the best way to do this.
The method doSomething is declared as...
-(void)doSomething;
Is there a better way to declare th...
How can I create UIButton in iphone app programatically to have square corners.
I don't want to have rounded corners.
...
Hi,
I'm having an inconsistent problem where sometimes I press on a button inside the scrollview. The scrollview catches the event and scrolls instead of the button getting the touch event.
Any idea how to solve this bizarre behavior.
Thanks
...
This is driving me nuts... I've seen a few posts on similar issues but can't seem to make it work, so here it is:
it is a very simple example, I am just creating a custom UIButton in a custom view, then assigning it a custom action to respond to touch events. When I run the app, the button is created, but nothing happens when I try to c...
I want to have an UIToolbar containing UIButtons with custom icons. As I can see, the highlighted appearence is provided (used when the button is being tapped). What I want is a default appearence for a selected icon (which I would control manually, bo [button setSelected]). According to HIG:
Don’t include a pressed or selected
app...
I'm trying to animate a button which moves around the screen. At any point, the user can push the button. But the button doesn't respond to touches. I've tried an animation block but the button simply moves immediately to its end coordinates, while the frame shows the animation (the button is called bubble):
[UIView beginAnimations:nil ...
hi all. i have a problem with the uibuttons . i cant scale image to fit their frame . please any advice
...
hi,
imagine i have a UIView and to that i add 2 UIButton's
i find that i can put a finger on one button, then, holding the first, i can touch the 2nd button with another finger. Both buttons will show their UIControlStateHighlighted images.
Is there a way to stop the 2nd touch working? I thought that multipleTouchEnabled = NO was the ...
Hi!
Another problem for me with my application is a simple procedure. I want to have a button which, if you press, opens the link associated with the article in question. I have followed instructions that i understand, but I am having trouble understanding why the link will not work.
- (IBAction)link:(id)sender {
WebViewController *vi...
Hi friends,
I have created scroll view and set the buttons in the scroll view. The buttons are scrolling horizontally. I created table view as subview for view controller. On clicking the buttons, the datas are displaying in the table view from RSS feeds using XML Parsing. SO changing the datas in the table view which depends the button...
Hi,
I am using AVAudioPlayer and am trying to get it so while the user presses on the device, it continuously plays until their finger lifts up. My code is below:
NSString *audioPath = [[NSBundle mainBundle] pathForResource:@"HahahaLong" ofType:@"mp3"];
primaryAudio = [[AVAudioPlayer alloc]initWithContentsOfURL:[NSURL fileURLWithPa...
Hi All,
I'm running into a small issue in my app.
I essentially have a series of UIButtons added as subviews in a scrollview which is part of a nib. Every time I tap on a button there is a noticeable delay before the button is highlighted. I essentially have to hold it for about half a second before the button dims and appears selected...
What would be the way to draw a triangular button on the iPhone. It would be nice if I could also change its parameters (backgroundcolor, font etc..) as with the regular buttons.
Ideally I would like equilateral triangles.
...
Hi there,
New to posting here but got many really useful bits of help already.
I am shoving some text into a UIButton title ( UIButton setTitle: forState: )
I want only the first bit of the text to be displayed (ie only amount that fits). Currently, I am getting extra text spilling over into the view.
Is there any easy way to help st...
Is it possible to create a button with multiple labels? e.g. imageView, textLabel and detailTextLabel.
I don't think it's possible using interface builder, but maybe we can do it programmatically by adding the UIImage and UILabels to button's view. If i do write a custom UIButton class, what's the best way to handle the state changes?
...
hi,
my view hierachy is following:
BigView
- UIScrollView
- View 1
- View 2
- View 3
- UIView
- UIButton
now i want, that when i press the UIButton, the BigView (which includes the button as well) moves 100px to the top (so parts of the BigView aren't visible any longer) and another UIView gets visible at the free space under...
I have a tableview that uses a custom UITableViewCell. In the cell, I have a button that shows a custom menu controller with three menu items. I would like to push a new view controller when you click the 'See Detail' button.
I have this run when the 'See Detail' button is clicked in the custom cell
- (void)seeDetail:(UIMenuControlle...