It's only supporting in navigation controller?
erhuabushuo opened this issue · 1 comments
erhuabushuo commented
It's only supporting in navigation controller?
loganwright commented
Hi @erhuabushuo
You could theoretically create your own top bar, but at the moment, SimpleChat is designed to be used with a navigation controller. If you want to present it modally, you could do something like this:
LGChatController *chatController = [LGChatController new];
chatController.opponentImage = [UIImage imageNamed:@"<#YourImageName#>"];
chatController.title = @"<#YourTitle#>";
LGChatMessage *helloWorld = [[LGChatMessage alloc] initWithContent:@"Hello World" sentByString:[LGChatMessage SentByUserString]];
chatController.messages = @[helloWorld]; // Pass your messages here.
chatController.delegate = self;
// Put chat controller in a navigation controller here
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:chatController];
[self presentViewController:nav withCompletion:nil];
Does this help resolve your issue?
Best,
Logan