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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.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 12-26-2009, 12:38 AM   #1 (permalink)
College Student
 
ColouredRobot's Avatar
 
Join Date: Dec 2009
Location: Los Angeles, CA
Posts: 75
Smile Setting an Object's Location With Code

I have a custom built slider, and when it is created in xcode, it appears at the top left corner of my app. I was wondering if anyone knew how to change location of an object through code. For example, move it 100 pixels lower on the screen. Thanks!
ColouredRobot is offline   Reply With Quote
Old 12-26-2009, 03:04 AM   #2 (permalink)
Registered Member
 
jfbomber's Avatar
 
Join Date: May 2009
Location: Murray, Utah
Posts: 24
Send a message via Yahoo to jfbomber
Default

in your loadview or init method just change the frame;

slider.frame = CGRectMake(x float, y float, width float, height float);
__________________
- Jason
jfbomber is offline   Reply With Quote
Old 12-26-2009, 03:58 AM   #3 (permalink)
College Student
 
ColouredRobot's Avatar
 
Join Date: Dec 2009
Location: Los Angeles, CA
Posts: 75
Default

Quote:
Originally Posted by jfbomber View Post
in your loadview or init method just change the frame;

slider.frame = CGRectMake(x float, y float, width float, height float);
Thanks, worked like a charm!
ColouredRobot is offline   Reply With Quote
Reply

Bookmarks

Tags
axis, button, location, set location, slider

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: 331
22 members and 309 guests
@sandris, ADY, BrianSlick, dacapo, Dani77, Dattee, dre, HDshot, HemiMG, JasonR, MarkC, mer10, nibeck, prchn4christ, ryandb2, spiderguy84, themathminister, timle8n1, tomtom100, viniciusdamone, vogueestylee, vvenkatachallam
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,883
Threads: 89,229
Posts: 380,763
Top Poster: BrianSlick (7,129)
Welcome to our newest member, vvenkatachallam
Powered by vBadvanced CMPS v3.1.0

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