0

有什么方法可以改变 UINotification Alert 的外观(外观形状),就像我可以在 UIAlertView 上插入图像一样,如下所示

    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 做同样的事情,但苹果应该接受它,因为我不能改变他们的库,否则应用商店会被拒绝。

4

1 回答 1

3

本地通知由系统创建和显示,而不是您的应用程序。因此,您无法控制它们的呈现方式。

于 2011-02-22T08:27:53.707 回答