如何在iPhone中设置UIViewController的backgroundcolor?
如何将NSTimeInterval定义为mm:ss格式?
如何通过我的应用程序iPhone中的fbconnect获取用户的Facebook个人资料照片?
在我的应用程序中,我想将.vcf文件添加为MFMailComposeViewController中的附件.
iphone attachment objective-c vcf mfmailcomposeviewcontroller
我希望第一次有人加载我的应用程序,让它从我有的首选项视图开始,每隔一次从主视图开始.
我找不到一种方法来检测这是否是第一次运行应用程序.有任何想法吗?
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch
NSUserDefaults *padFactoids;
int launchCount;
padFactoids = [NSUserDefaults standardUserDefaults];
launchCount = [padFactoids integerForKey:@"launchCount" ] + 1;
[padFactoids synchronize];
NSLog(@"this is the number: %i of times this app has been launched", launchCount);
if ( launchCount == 1 )
{
NSLog(@"this is the FIRST LAUNCH of the app");
// do stuff here as you wish
bbb = [[Blue alloc]init];
[window addSubview:bbb.view];
}
if ( launchCount >= 2 …Run Code Online (Sandbox Code Playgroud) 如何在iPhone中设置特定按钮的背景颜色?
我用了:
btnName1 = [ColorfulButton buttonWithType:UIButtonTypeRoundedRect];
btnName1.frame=CGRectMake(45,146,220,40);
[btnName1 setTitle:@"Continue" forState:UIControlStateNormal];
[btnName1 setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[btnName1 setImage:[UIImage imageNamed:@"green.png"] forState:UIControlStateNormal];
UIImage *img =[UIImage imageWithContentsOfFile:[[NSBundle mainBundle]pathForResource:@"greenish" ofType:@"png"]];
UIImage *strechableImage = [img stretchableImageWithLeftCapWidth:12 topCapHeight:0];
[btnName1 setBackgroundImage:strechableImage forState:UIControlStateNormal];
[btnName1 setNeedsDisplay];
[InfoView addSubview:btnName1];
Run Code Online (Sandbox Code Playgroud)
它在iPhone模拟器上正常工作,但在iPod上没有(iPod中没有显示颜色).
我已经NSMutableArray *mutArray = [[NSMutableArray alloc]initWithObjects:obj1,obj2,obj3,nil];
和每个对象有姓名,职务,地址,但是我想表明在其他的NSMutableArray这说明以相反的顺序mutArray则意味着OBJ 3,obj2的&然后OBJ1,无我是怎么做的.
IS MFMailComposeViewController在ipod 3.0上工作?
iphone ×9
objective-c ×9
ios ×2
mfmailcomposeviewcontroller ×2
attachment ×1
border ×1
cocoa ×1
facebook ×1
fbconnect ×1
reverse ×1
uibutton ×1
uilabel ×1
vcf ×1