Iphone 如何从UINotification更改警报的外观?
是否有任何方法可以更改UINotification Alert的outlook(外观形状),比如我可以在UIAlertView上插入图像,如下所示Iphone 如何从UINotification更改警报的外观?,iphone,uilocalnotification,Iphone,Uilocalnotification,是否有任何方法可以更改UINotification Alert的outlook(外观形状),比如我可以在UIAlertView上插入图像,如下所示 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Status Update" message:myString delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; UIImageView *ima
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Status Update" message:myString delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 30, 100, 100)];
NSString *path = [[NSString alloc] initWithString:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"reminder_logo.png"]];
UIImage *bkgImg = [[UIImage alloc] initWithContentsOfFile:path];
[imageView setImage:bkgImg];
[bkgImg release];
[path release];
[alert addSubview:imageView];
[imageView release];
[alert show];
[alert release];
此代码将在UIAlertView上显示一个图像。我想要同样的UINotification,但苹果应该接受,因为我不能更改他们的库,否则AppStore会拒绝。本地通知是由系统创建和显示的,而不是你的应用程序。因此,您无法控制它们的显示方式。本地通知是由系统而不是应用程序创建和显示的。因此,您无法控制它们是如何呈现的。这是我已经知道的,但我想知道是否有其他方法可以操纵它们?我不确定是否可以更清楚地表达出来。没有办法操纵它们,因为它们不在你的应用程序中。除了越狱设备和手动编辑用于警报视图的资产外,无法更改其外观。打开应用程序时可以更改本地通知标题,但在后台运行应用程序时无法更改。该标题与“outlook(外观形状)”无关正如你所说的,这是我已经知道的,但我在问其他的方法来操纵它们吗?我不确定我是否能说得更清楚。没有办法操纵它们,因为它们不在你的应用程序中。除了越狱设备和手动编辑用于警报视图的资产外,无法更改其外观。本地通知标题可以在应用程序打开时更改,但在应用程序正在后台运行时无法更改。该标题与您所说的“outlook(外观形状)”无关。