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 09-14-2010, 07:55 AM   #1 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 26
tobban2 is on a distinguished road
Default Use accelerometer to fade picture?

Hello!

A quick question to start with - Is there any easy way to use the accelerometer to fade a picture in and out?

I got a code for showing the x,y and z in numbers and as progressbars. But I want to use it to fade a picture. Anyone got any ideas?

Last edited by tobban2; 09-14-2010 at 08:18 AM.
tobban2 is offline   Reply With Quote
Old 09-14-2010, 08:46 AM   #2 (permalink)
Registered Member
 
Join Date: Feb 2009
Posts: 178
dustbyter is on a distinguished road
Default

In order to get this type of affect you need todo two things.

1. Get Accelerator code to work
2. Get fade out animation to work


I'd start out with getting the accelerator working and printing out a message to the console. Once that works you can look into doing a fade out by changing the alpha value of the view the image it is on.
dustbyter is offline   Reply With Quote
Old 09-14-2010, 02:06 PM   #3 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 26
tobban2 is on a distinguished road
Default

I'll watch on it! Another quick question - When the accelerometer is negative - it realy isn't negative?
When I do an if statement like "if X > 5 print x is bigger then 5" It shows it's bigger then 5 when it is bigger then 5, and smaller then -5.
Same with progressbars - when it's at 5 its full, on 0 it's empty, on -5 it's full.
tobban2 is offline   Reply With Quote
Old 09-14-2010, 02:14 PM   #4 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,983
smithdale87 is on a distinguished road
Send a message via AIM to smithdale87
Default

YOu must be using X as the absolute value
smithdale87 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



» Advertisements
» Online Users: 332
17 members and 315 guests
appservice, bignoggins, cayladv57, dermotos, Domele, EXOPTENDAELAX, guusleijsten, Hamad, heshiming, linkmx, Objective Zero, Paul Slocum, Rudy, Sloshmonster, teebee74, v1n2e7t
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,654
Threads: 94,116
Posts: 402,889
Top Poster: BrianSlick (7,990)
Welcome to our newest member, cayladv57
Powered by vBadvanced CMPS v3.1.0

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