Closed erhuabushuo closed 9 years ago
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
It's only supporting in navigation controller?