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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.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 05-02-2011, 01:19 AM   #1 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 236
lilzz is on a distinguished road
Default How do you improve UIButton Response time?

[Btn addTarget:self action:@selector(action forControlEvents:UIControlEventTouchDown];

The Btn's response time from pressing to action has some delay. How to improve the UIButton's response time?
lilzz is offline   Reply With Quote
Old 05-02-2011, 01:37 AM   #2 (permalink)
Beast Mode
 
Join Date: Dec 2008
Age: 21
Posts: 1,971
Bertrand21 is on a distinguished road
Default

Quote:
Originally Posted by lilzz View Post
[Btn addTarget:self action:@selector(action forControlEvents:UIControlEventTouchDown];

The Btn's response time from pressing to action has some delay. How to improve the UIButton's response time?
Try touchupinside instead.
__________________
Haters gonna Hate
Likers gonna Like
Bertrand21 is offline   Reply With Quote
Old 05-02-2011, 02:32 AM   #3 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Jan 2010
Location: Issaquah, WA
Age: 42
Posts: 1,244
dljeffery is on a distinguished road
Default

Definitely you should be using touch up inside instead, so the user can cancel an accidental touch. (well, at least in 99% of typical iOS UI cases...)

However, if you're experiencing a delay, the issue has got to be due to what you are running in response to the event.
__________________
Recall It! Tag your notes. Tag your photos. Tag your thoughts. Tag your life.

Recall It! for iPad

http://www.dljeffery.com
dljeffery is offline   Reply With Quote
Old 05-02-2011, 03:29 AM   #4 (permalink)
Registered Member
 
ngaikwad's Avatar
 
Join Date: Feb 2011
Location: Mobile World
Posts: 450
ngaikwad is on a distinguished road
Default

use touch up inside and check which process is run after that i think there the data fetching require time
ngaikwad is offline   Reply With Quote
Old 11-20-2011, 08:36 PM   #5 (permalink)
Registered Member
 
Join Date: May 2011
Posts: 135
thephotographer is on a distinguished road
Default

Did any of the answers fix your problem?

I am having a delay as well. I'm not sure what is causing it. i am already using touch up inside

Code:
[buttonGalleryImageButton addTarget:self action:@selector(buttonGalleryButtonPressed:) forControlEvents: UIControlEventTouchUpInside];
when i push a button, the button turns dark for about a second, then as soon as it returns normal the code is executed, which takes only 0.0014 seconds to execute the code in the buttonPressed selector. I'm not sure why the delay is there though. my view hierarchy goes something like this

main window > uiview > uiscrollview > uiscrollview > uiview > uiview >uibutton.

both scrollviews have delaysContentTouches = NO;
thephotographer is online now   Reply With Quote
Reply

Bookmarks

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
» Online Users: 343
11 members and 332 guests
dansparrow, iOS.Lover, lorrettaui53, MikaelBartlett, Nobbsy, oztemel, pbart, PlutoPrime, sledzeppelin, thephotographer, Trickphotostudios
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,663
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, LezB44
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:55 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0