我正在开发iphone应用程序,我必须合并三个图像并使它们成为单个图像.我的意思是说我有一个背景图像,一个标题图像和较低的图像,我需要将所有这些组合成一个单一的图像,所以我可以使用它发布到Facebook.谢谢.
*编辑* 我知道两个图像的代码,但我如何使用它为三个图像:
UIGraphicsBeginImageContext(saveView.bounds.size);
[saveView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *finalImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
Run Code Online (Sandbox Code Playgroud) 我正在使用这个编码进行苹果推送通知,推送通知即将到来,但它们没有任何徽章,任何建议这个代码有什么问题,我没有得到徽章.我已经检查了设置选项卡,并且那里有徽章.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[UIApplication sharedApplication]
registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeAlert |
UIRemoteNotificationTypeBadge |
UIRemoteNotificationTypeSound)];
[UIApplication sharedApplication].applicationIconBadgeNumber = 0;
}
- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken1 {
NSString *str = [NSString
stringWithFormat:@"%@",deviceToken1];
NSLog(@"%@",str);
self.deviceToken = [NSString stringWithFormat:@"%@",str];
NSLog(@"dev --- %@",self.deviceToken);
self.deviceToken = [self.deviceToken stringByReplacingOccurrencesOfString:@"<" withString:@""];
self.deviceToken = [self.deviceToken stringByReplacingOccurrencesOfString:@" " withString:@""];
self.deviceToken = [self.deviceToken stringByReplacingOccurrencesOfString:@">" withString:@""];
NSLog(@"dev --- %@",self.deviceToken);
}
- (void)application:(UIApplication *)app didFailToRegisterForRemoteNotificationsWithError:(NSError *)err {
NSString *str = [NSString stringWithFormat: @"Error: %@", err];
NSLog(@"%@",str);
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo …Run Code Online (Sandbox Code Playgroud) iphone objective-c push-notification apple-push-notifications ios4