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

View Single Post
Old 04-23-2009, 10:44 AM   #3 (permalink)
DiGk
Registered Member
 
Join Date: Apr 2009
Posts: 34
Default

Quote:
Originally Posted by dcwhat View Post
Code:
.h
	IBOutlet UIImageView *test;
@property(nonatomic,retain) IBOutlet UIImageView *test;
.m
@synthesize test;
-(void)boundsCheck {
	if(test.center.x > self.view.bounds.size.width || test.center.x < 0) {
		NSLog(@"you hit the X axis boarder");
	}
}
i have an image that im moving around and im trying to see if it will send me a message in my log, when ever i drag the image over to the x axis bound. Can someone help me please.


also just a quick not, im not sure how to use varibles i tried
int x = 0;
then
x++;
how do i should it in my log?
NSLog(@"%x") <-- is that right?
To have the int showing in the console do like this

Code:
NSLog(@"%i", x);
%i refer to a int
%d refer to a decimal number
%@ refer to an object such as NSString or NSInteger
and so on
DiGk is offline   Reply With Quote
 

» Advertisements
» Online Users: 680
15 members and 665 guests
ADY, ampliseo, ben555, Dalia, foolshityella, John_smiths, jollyrgr, Khurshid, MarcoAlmeida, Mariusz Kowalczyk, PeterBishop, shiv@globussoft.com, suresk, ujtordai
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,633
Threads: 89,150
Posts: 380,346
Top Poster: BrianSlick (7,110)
Welcome to our newest member, ampliseo
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:02 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.