开发者

how can I change appearance of alert from UINotification?

is there any way to change the outlook(appearance shape) of UINotification Alert, like I can insert image on UIAlertView, as below

    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];

This code will show an image on UIAlertView. I want same thing for UINotification, but apple should accept it, because I can't alter their libraries, else rejection will happen from app store.


Local notifications are created and displayed by the system, not your app. Therefore you have no control over how they are presented.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜