Advertise Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Your First iPhone App
($1.99)

iPhone Code Generator
($9.99)

Calcuccino Programmers' Calculator
($2.99)

DataFon(Build Apps on Windows)
(free)

Infinote Pinboard for Todos and Notes
(free)

picplz
(free)

poG
($2.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-11-2009, 05:36 AM   #1 (permalink)
Registered Member
 
Join Date: Jan 2009
Location: Leeds, England
Posts: 97
Default Problem with infoButton on Utility based app

Hi Guys

I am having an issue with the info button in a stardard xcode utility based app.

All I have done is put a button in the middle of the MainView.xib and now when I run the app the infoButton to flip the view only works if you tap it about 3 or 4 times.

If I remove the button and have my MainView blank it is fine.

Has anyone else had this problem?

Does anyone know something obvious I am doing wrong.

Thanks in advance.
BenODwyer is offline   Reply With Quote
Old 02-11-2009, 12:31 PM   #2 (permalink)
New Member
 
Join Date: Jan 2009
Posts: 73
Default

Quote:
Originally Posted by BenODwyer View Post
Hi Guys

I am having an issue with the info button in a stardard xcode utility based app.

All I have done is put a button in the middle of the MainView.xib and now when I run the app the infoButton to flip the view only works if you tap it about 3 or 4 times.

If I remove the button and have my MainView blank it is fine.

Has anyone else had this problem?

Does anyone know something obvious I am doing wrong.

Thanks in advance.
You're doing nothing wrong, it's that the info button is so tiny, it's hard to hit. One way around this is to make a larger invisible custom button (don't select a background) and have it connect to the same method as the info button. Now drag the info button to the center of the invisible button.
jeffelkins is offline   Reply With Quote
Old 02-11-2009, 12:32 PM   #3 (permalink)
New Member
 
RickMaddy's Avatar
 
Join Date: Oct 2008
Location: Denver, CO
Posts: 2,121
Default

You can also make the info button's frame bigger. Then you still get the info button animation.
RickMaddy is offline   Reply With Quote
Old 02-11-2009, 12:39 PM   #4 (permalink)
New Member
 
Join Date: Jan 2009
Posts: 73
Default

Quote:
Originally Posted by RickMaddy View Post
You can also make the info button's frame bigger. Then you still get the info button animation.
I set the invisible button to "glow," but how do you make the info frame bigger?
jeffelkins is offline   Reply With Quote
Old 02-11-2009, 01:06 PM   #5 (permalink)
New Member
 
RickMaddy's Avatar
 
Join Date: Oct 2008
Location: Denver, CO
Posts: 2,121
Default

It's just a UIView ultimately. Any view can have it's frame set. I do it in code though. I don't use IB.
RickMaddy is offline   Reply With Quote
Old 02-11-2009, 01:12 PM   #6 (permalink)
New Member
 
Join Date: Jan 2009
Posts: 73
Default

Quote:
Originally Posted by RickMaddy View Post
It's just a UIView ultimately. Any view can have it's frame set. I do it in code though. I don't use IB.
I'm not at that level yet
jeffelkins is offline   Reply With Quote
Old 02-11-2009, 02:17 PM   #7 (permalink)
Registered Member
 
Join Date: Jan 2009
Location: Leeds, England
Posts: 97
Default

Thanks guys. Looks like I am going to have to place the infobutton programatically rather than in IB.

Cheers for the pointers it has been driving me nuts!
BenODwyer is offline   Reply With Quote
Old 02-11-2009, 03:42 PM   #8 (permalink)
New Member
 
RickMaddy's Avatar
 
Join Date: Oct 2008
Location: Denver, CO
Posts: 2,121
Default

Is it really true that IB doesn't allow you to change the size of a button?
RickMaddy is offline   Reply With Quote
Old 02-11-2009, 03:50 PM   #9 (permalink)
New Member
 
Join Date: Jan 2009
Posts: 73
Default

Quote:
Originally Posted by RickMaddy View Post
Is it really true that IB doesn't allow you to change the size of a button?
Round rec or custom buttons can be changed easily.
jeffelkins is offline   Reply With Quote
Old 02-11-2009, 03:54 PM   #10 (permalink)
Registered Member
 
Join Date: Jan 2009
Location: Leeds, England
Posts: 97
Default

Yes I tried putting a custom blank button over the top and calling the toggleView. But it didn't improve the performance at all.

I will do a re-write tomorrow after giving it a bit of brain time. I do tend to rely on IB quite alot.
BenODwyer is offline   Reply With Quote
Old 02-11-2009, 03:58 PM   #11 (permalink)
New Member
 
Join Date: Jan 2009
Posts: 73
Default

Quote:
Originally Posted by BenODwyer View Post
Yes I tried putting a custom blank button over the top and calling the toggleView. But it didn't improve the performance at all.

I will do a re-write tomorrow after giving it a bit of brain time. I do tend to rely on IB quite alot.
Works great here Ben.
jeffelkins is offline   Reply With Quote
Old 02-11-2009, 04:09 PM   #12 (permalink)
Registered Member
 
Join Date: Jan 2009
Location: Leeds, England
Posts: 97
Default

Hmm... Interesting.

Are you just linking the touchDown or TouchUpInside of the new button to the toggleView in the First Responder ?

If I make a new project of type Utility App it seems to respond fine. But as soon as I put anything in MainView.xib e.g. a button it starts to only respond to every third or fourth press.

Very frustrating...
BenODwyer is offline   Reply With Quote
Old 03-14-2009, 07:30 PM   #13 (permalink)
New Member
 
Join Date: Mar 2009
Posts: 1
Post

Quote:
Originally Posted by jeffelkins View Post
I'm not at that level yet
I just had the same problem and found a page with great sample code showing how to make the infoButton frame larger: iPhone SDK Examples
I am using XCode's "Utility Application" project template and so I stuck the code in viewDidLoad in RootViewController.m--could be the wrong place for all I know (I'm just starting out to develop on the iPhone) but it did seem to work, making the infoButton much easier to tap.
iRandy is offline   Reply With Quote
Old 03-15-2009, 09:12 AM   #14 (permalink)
New Member
 
Join Date: Jan 2009
Posts: 73
Default

Quote:
Originally Posted by iRandy View Post
I just had the same problem and found a page with great sample code showing how to make the infoButton frame larger: iPhone SDK Examples
I am using XCode's "Utility Application" project template and so I stuck the code in viewDidLoad in RootViewController.m--could be the wrong place for all I know (I'm just starting out to develop on the iPhone) but it did seem to work, making the infoButton much easier to tap.
Very useful! Thanks for posting.
jeffelkins is offline   Reply With Quote
Old 04-06-2009, 01:16 PM   #15 (permalink)
Registered Member
 
DenVog's Avatar
 
Join Date: Jan 2009
Location: Silicon Valley, USA
Posts: 586
Default

Quote:
Originally Posted by RickMaddy View Post
Is it really true that IB doesn't allow you to change the size of a button?
Can anyone confirm this? I have added a button Type: Info Light via interface builder. I tried using the code to increase the frame size, but can't tell any difference when I run it.

Is it required to add the button programatically in order to change the frame size? I do know that if I look at the size in Interface Builder, the values 18 x 19 are grayed out.
DenVog is offline   Reply With Quote
Reply

Bookmarks

Tags
infobutton, mainview, problem

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


» Advertisements
» Stats
Members: 51,375
Threads: 52,830
Posts: 225,477
Top Poster: BrianSlick (3,576)
Welcome to our newest member, darrentousignant
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:28 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0