Alex Serj
Alex Serj

Reputation: 41

UIlocalNotification body

How can make UILocal Notification if I need to show all body

 localNotif.fireDate = fireDate;
localNotif.alertBody = [NSString stringWithFormat:NSLocalizedString(@"%@", nil),
                        strMessage];
localNotif.alertAction = NSLocalizedString(@"View Details", nil);

localNotif.soundName = UILocalNotificationDefaultSoundName;
localNotif.applicationIconBadgeNumber = 1;

NSDictionary *infoDict = [NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"Happy_%@",strMessage] forKey:ToDoItemKey];
localNotif.userInfo = infoDict;

localNotif.applicationIconBadgeNumber = localNotif.applicationIconBadgeNumber+1;    
[[UIApplication sharedApplication] scheduleLocalNotification:localNotif];

This problem

enter image description here

Upvotes: 0

Views: 149

Answers (1)

tilo
tilo

Reputation: 14169

Simply put: you can't. You may want to shorten the text, or display a full message when the user opens the app from this notification. Note that clipping is not just depending on the number of characters, but also on the character width (if you are supporting multiple languages).

Upvotes: 1

Related Questions