Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

primedime

macrumors member
Original poster
Mar 21, 2011
66
0
Ft. Lauderdale, FL
I want to make a push up application where you would place the phone underneath yourself and as you completed a push up it will count for you.... I used a few from the app store that did this and it works nicely... I tried looking this function up in the library but I must not be searching the correct keywords, anyone want to point me in the right direction?

Thanks!!
 

primedime

macrumors member
Original poster
Mar 21, 2011
66
0
Ft. Lauderdale, FL
Thanks, I was getting a lot of articles in regards to Apple fixing the proximity sensor issues and nothing about xcode. I will do some research on this now, doesn't seem to be that difficult to implement in my app. But then again, only time will tell!
 

timbojill

macrumors member
May 21, 2011
31
0
I just googled your title, and found several stuff for this..

Code:
 Just observe the notification: UIDeviceProximityStateDidChangeNotification

so, i guess u know what to do now.

What are the properties ? I want to create an apps that does A if there is no movement and B if there is movement. So in theory someone will hit a button I will tie to UIDeviceProximityStateDidChangeNotification.
 

jnoxx

macrumors 65816
Dec 29, 2010
1,343
0
Aartselaar // Antwerp // Belgium
it's not if (movement) else blah. because it's only when u put your finger on the proximity sensor it will be triggered.
If u want to check for movement, I think it's best u look at some camera apps which can figure out of something is moving. or Accelerometer or something similar.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.