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 06-20-2010, 04:03 PM   #26 (permalink)
Top Contributor
 
Join Date: Apr 2009
Location: N/A
Posts: 478
williamlegate is on a distinguished road
Unhappy

Quote:
Originally Posted by mycatsnameisbernie View Post
After spending way too much time on this, I finally have some code that I am happy with. I solved the two problems from my previous post as follows:
  1. I added the full image of the track as a UIImageView instead of making it the UISlider's background image. This avoids the "squishing" of the edges of the track as the slider moves. It also allows the UISlider to be smaller than the track, so there is no longer a need to add transparent padding to the thumb image.
  2. I implemented the "shimmering" text animation using the method in this post.

You can download an XCode project containing my code here.

There are 2 issues that could use improvement if anyone else wants to try...
  1. The text animation is done using a repeating NSTimer to programatically shift the text highlighting. I would have preferred to have the iPhone's graphics engine perform the animation. I couldn't figure out how to do this with Core Animation on the iPhone. I think it could be done with CA on OS X using CALayer mask layers, but mask layers are not supported on iPhone OS. It might be possible with OpenGL, but I don't have any expertise in that area.
  2. The text rendering code only supports Roman alphabets. In order to support Asian or other non-Roman alphabets, the text drawing code needs to be modified to use glyphs instead of characters.

Hope this helps...
Hmmmm... It looks like the iPhone SDK 4 makes it so that the default slider track appears over the custom slider track. Does anyone have a fix for this?
williamlegate is offline   Reply With Quote
Old 06-29-2010, 11:42 PM   #27 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 1
noxlist is on a distinguished road
Default iPhone SDK 4 fix

Quote:
Originally Posted by williamlegate View Post
Hmmmm... It looks like the iPhone SDK 4 makes it so that the default slider track appears over the custom slider track. Does anyone have a fix for this?
/ CODE

[slider setMinimumTrackImage:[UIImage alloc] forState:UIControlStateNormal];
[slider setMaximumTrackImage:[UIImage alloc] forState:UIControlStateNormal];
noxlist is offline   Reply With Quote
Old 07-12-2010, 02:42 PM   #28 (permalink)
Registered Member
 
Join Date: Jul 2010
Posts: 1
cibi84 is on a distinguished road
Unhappy helps

I need information you can use that, as slide to unlock key to be able to open a video?
cibi84 is offline   Reply With Quote
Old 07-14-2010, 05:42 PM   #29 (permalink)
Registered Member
 
Join Date: Oct 2009
Posts: 18
sbudhram is on a distinguished road
Default

I'm using this class and have found it extremely useful

In my setup, there's one thing I've noticed that causes this class to crash when it is released. I've modified the code quite a bit since getting it, but I figured some of you might be running into the same issue, so I post it here.

The 'loadView' method is setting the label's layer's delegate to self. The SDK documentation says this is explicitly prohibited for CALayers, and should only be set to the main view (which would be label, not the controller). This was causing me to crash on deallocation of this instance. To fix, I set:

label.layer.delegate = nil;

in my deallocation method.

Hope this helps someone... took me a day to nail it down.
sbudhram is offline   Reply With Quote
Old 07-20-2010, 05:42 PM   #30 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 109
WRXFlyer is on a distinguished road
Default

Does anyone have this active in their app? I have heard that using the slider will cause a rejection.
WRXFlyer is offline   Reply With Quote
Old 09-15-2010, 07:46 PM   #31 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 3
mycatsnameisbernie is on a distinguished road
Default

Quote:
Originally Posted by WRXFlyer View Post
Does anyone have this active in their app? I have heard that using the slider will cause a rejection.
Apple recently received a patent on slide-to-unlock: Apple awarded patents for Slide to Unlock, keyboard letter pop So I would guess they would not be happy about use of this code in an app.

Although this code ran great for me in the simulator, I found it performed very poorly on the real device. So I never used it in my app. I think the best way to improve performance on the device would be to get rid of the UISlider, and track touches movement in the enclosing view. Use the tracked touches to move the thumb image. But do this at your own risk of rejection.
mycatsnameisbernie is offline   Reply With Quote
Old 10-03-2010, 10:56 AM   #32 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 13
me0007 is on a distinguished road
Default

Has anybody used this in an app available on the app store? I.e. has anybody experienced trouble with getting his app authorized if this slider is used?

I would like to know because otherwise I would think of using something else...

TIA,

Steve
me0007 is offline   Reply With Quote
Reply

Bookmarks

Tags
interface builder, nib

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: 328
4 members and 324 guests
guusleijsten, HowEver, LEARN2MAKE, mottdog
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,113
Posts: 402,880
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Anwerbl
Powered by vBadvanced CMPS v3.1.0

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