0
如何打印 - > event.latitude = [[values objectAtIndex:0] floatValue]的值; ?如何打印對象變量?
下面是我的一些代碼:
@interface SeismicEvent : NSObject <MKAnnotation>{
float latitude;
float longitude;
**This is an object
SeismicEvent *event;
** This reads in a float
event.latitude = [[values objectAtIndex:0] floatValue];
如何打印出event.latitude?
我試過的NSString *str = [NSString stringWithFormat:@"%@", event.latitude];
謝謝你們。
您應該添加Objective-C的標籤對這個問題。 – 2010-07-16 00:42:12
@Jesse Dhillon - 你可以編輯他的標籤(因爲你的聲望超過500)。 – 2010-07-16 00:53:47
謝謝你們,對於新手問題感到抱歉 – Morry 2010-07-16 01:32:26