Sportica   Sportica

06 2012 档案

摘要:NSMutableDictionary *d = [NSMutableDictionary dictionary]; [d setObject:@"qingjoin" forKey:@"serveraddr"]; [d setObject:@"pwdpwd" forKey:@"userpwd"]; NSLog(@"%@",d); //新建一个对象。 id ontest = [d objectForKey:@"serveraddr"]; id sectest = [d obje 阅读全文
posted @ 2012-06-29 18:00 qingjoin 阅读(229) 评论(0) 推荐(0) 编辑
摘要://button 类的控制。取出当前button 显示的值NSString *server_addvarle = [sender titleForState:UIControlStateNormal]; NSLog(@"%@",server_addvarle); 阅读全文
posted @ 2012-06-29 16:02 qingjoin 阅读(193) 评论(0) 推荐(0) 编辑
摘要://.h文件#import <Foundation/Foundation.h>@interface Fraction : NSObject //定义一个新的类,里面有两个成员{ int numberator; int denominator;}-(void) print; //定义打印输出-(void) test_number;-(void) setNumberator:(int)n;-(void) setDenominator:(int)b;@end//.m文件中,具体实施#import "testone.h"@implementation Frac... 阅读全文
posted @ 2012-06-28 16:13 qingjoin 阅读(345) 评论(0) 推荐(0) 编辑
摘要:-(void)redfile{ FILE *fp=fopen([[self bundlePath:@"information.txt"]UTF8String], "r"); char word[100]; if (!fp) { return; } while(fgets(word, 100,fp)) { word[strlen(word)-1] = '\0'; NSLog(@"%s",word); } fclose(fp);}//读取同目录下文件路jin-(NSString *)b... 阅读全文
posted @ 2012-06-28 13:49 qingjoin 阅读(588) 评论(0) 推荐(0) 编辑
摘要://.h 文件#import <UIKit/UIKit.h>@interface ViewController : UIViewController<UITextFieldDelegate> // type 选择outlet 然后在后面加上。<UITextFieldDelegate>@property (retain, nonatomic) IBOutlet UITextField *TXF; //.c文件 中。#import "ViewController.h"@interface ViewController ()@end@imple 阅读全文
posted @ 2012-06-28 10:47 qingjoin 阅读(283) 评论(0) 推荐(0) 编辑
摘要:- (IBAction)reslut_value:(id)sender{ /*分别表示年、月、日、时、分、秒*/ NSInteger unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSWeekCalendarUnit | NSHourCalendarUnit| NSMinuteCalendarUnit | NSSecondCalendarUnit; //******************** NSDate *dat... 阅读全文
posted @ 2012-06-27 16:13 qingjoin 阅读(477) 评论(0) 推荐(0) 编辑
摘要:// test.h 中的头文件#import <UIKit/UIKit.h>@interface test : UIViewController-(void)temp:(int)value1 :(int) value2;@end/******************************/// test.m文件 用来写一个方法#import "test.h"@interface test ()@end@implementation test-(void)temp:(int)value1 :(int) value2{ int temp; if(value1< 阅读全文
posted @ 2012-06-26 15:59 qingjoin 阅读(281) 评论(0) 推荐(0) 编辑

  Sportica
点击右上角即可分享
微信分享提示