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

View Single Post
Old 04-23-2009, 09:44 AM   #3 (permalink)
DiGk
New Member
 
Join Date: Apr 2009
Posts: 32
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
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,248
Threads: 39,028
Posts: 171,170
Top Poster: smasher (2,571)
Welcome to our newest member, mitch2702
Powered by vBadvanced CMPS v3.1.0

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