Page 1 of 1

Send public Message with storyboard

Posted: 11 Dec 2013, 15:21
by brandonautry
I'm having a problem with the simpleChat example. While the example uses xib's and I am using the storyboard I believe this is where my problem is.
- (void)onPublicMessage:(SFSEvent *)evt
{
NSLog(@"AppDelegate::onPublicMessage");
ChatViewController * cvc = (ChatViewController *)_viewController;
if ([cvc respondsToSelector:@selector(onPublicMessage:)])
{
[cvc onPublicMessage:evt];
}
}
The onPublicMessage event method in the appDelegate is called when i debug however it never is called on the chatViewController. So my scrollView never has the messages loaded. :?

Re: Send public Message with storyboard

Posted: 12 Dec 2013, 14:43
by Lapo
This is not very related to the SFS API in itself, but more on how you have organized your views in the code. It's pretty difficult to guess what might be wrong.
We do have an example that uses the Storyboard and it's this one:
http://docs2x.smartfoxserver.com/ExamplesIOS/signup

I'd suggest to take a look and see how we organized the code there.

Hope it helps

Re: Send public Message with storyboard

Posted: 26 Jan 2014, 22:00
by brandonautry
I was able to figure it out! I didn't understand how it worked, after some research I now understand the api. Thank you!

Re: Send public Message with storyboard

Posted: 28 Jan 2014, 09:46
by Lapo
Great, cheers