Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.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 07-04-2009, 10:28 AM   #1 (permalink)
New Member
 
Join Date: Jan 2009
Location: Minneapolis, MN
Posts: 5
Default Setting alpha = 0 on slider

I have a slider on which I would like to set its alpha to zero. This effectively makes it invisible. This works fine on a label in the viewDidLoad method.

On a slider it seems to have no effect (although setting the value does).

Any ideas?
BobGordon is offline   Reply With Quote
Old 07-04-2009, 10:38 AM   #2 (permalink)
Tutorial Author
 
Join Date: Jun 2009
Posts: 25
Default

This works for me:
Code:
mySlider.hidden = YES;
A tip; if you intend to hide the slider and another view - such as the UILabel you described - it is easier to just drag a UIView in Interface Builder to your project and then add all those objects as subviews to that view. If you hide that one they will all hide. This works since they become subclassed to that specific UIView and thus inherit the given hidden property of their parent class.

Last edited by Bovn; 07-04-2009 at 10:40 AM.
Bovn is offline   Reply With Quote
Old 07-04-2009, 10:50 AM   #3 (permalink)
New Member
 
Join Date: Jan 2009
Location: Minneapolis, MN
Posts: 5
Default

Quote:
Originally Posted by Bovn View Post
This works for me:
Code:
mySlider.hidden = YES;
This does work in the sense that the slider is hidden. The reason I was setting the alpha is so when the user touches a "find" button the slider (and a couple of other objects) gradually come into view. Works well except for the slider.

Note that when the find is done, the objects and slider have their alphas set back to zero, and that works fine. It's only when first showing the view that the problem occurs.
BobGordon is offline   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


Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,157
Threads: 38,932
Posts: 170,812
Top Poster: smasher (2,565)
Welcome to our newest member, hydevil
Powered by vBadvanced CMPS v3.1.0

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