Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed hotline controller issue. #19

Open
dangnv opened this issue Apr 8, 2017 · 6 comments
Open

Embed hotline controller issue. #19

dangnv opened this issue Apr 8, 2017 · 6 comments

Comments

@dangnv
Copy link

dangnv commented Apr 8, 2017

Hi Hotline team, before I used embed controller to show conversations
UIViewController *hotlineController = [[Hotline sharedInstance] getConversationsControllerForEmbed]; hotlineController.view.frame = _hotlineContainer.bounds; [_hotlineContainer addSubview:hotlineController.view]; [self addChildViewController:hotlineController]; [hotlineController didMoveToParentViewController:self];
and it works well, but now is no. you can see image here. (No Navigation bar and status bar is overlapping screen).
![simulator screen shot apr 8 2017 18 17 11]
simulator screen shot apr 8 2017 18 17 11

Could you check and fix it?

@harish-kumarc
Copy link
Contributor

harish-kumarc commented Apr 10, 2017

Hi @dangnv ,

Please check that you are using latest sdk and for your embed viewController implementation there can be two possible solutions -

  1. Add Hotline as subview into your viewController as -
    UIViewController *hotlineController = [[Hotline sharedInstance] getConversationsControllerForEmbed];
    UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:hotlineController];
    nav.view.frame = self.view.bounds;
    [self.view addSubview:nav.view];
    [self addChildViewController:nav];
    [hotlineController didMoveToParentViewController:self];

  2. Else just push embed viewController into your navigation stack as mentioned in below code -
    UIViewController *hotlineController = [[Hotline sharedInstance] getConversationsControllerForEmbed];
    [self.navigationController pushViewController:hotlineController animated:YES];

Thanks and let us know to if the solutions fix your issue.

@rohitpal440
Copy link

Hi @harish6989 , @hrishikesh-p ,
we, at practo, also use hotline for support. We present hotline conversation as a child controller of a BaseViewController. child is embeded into a navigation controller as you mentioned above.
So, everything is working fine upto HOTLINE v1.3.1. We have something like this
img_0367

But when I updated the hotline pod to v1.3.2. or above version. The cross(x) aka close button is not available anymore to navigation bar of my child controller view.

Please Fix the above problem so that we can point hotline pod to latest sdk.

@harish-kumarc
Copy link
Contributor

Hi @rohitpal440,

Hotline embed view [[Hotline sharedInstance] getConversationsControllerForEmbed] is ideal for adding to views like tabviewcontroller, so the close button is detached.
And you can push embed Hotline view if you specifically want it in your navigation stack.
Other than that it's always preferred to follow presentView for Hotline.

Thanks

@rohitpal440
Copy link

Hi @harish6989 ,
We always present hotline. We can not push the hotline view as it's not feasible for us.
As you can see we are adding close button by ourselves but the SDK is removing it.
Either don't remove it or atleast give us a public method to add navigation items.

Thanks

@harish-kumarc
Copy link
Contributor

Hi @rohitpal440,

To present Hotline view with “Close” you just need to call [[Hotline sharedInstance] showConversations:self]; in action method of your view controller. No need to any embed view or adding any subview. Please check more here https://support.hotline.io/support/solutions/articles/221185-hotline-ios-sdk-integration

Thanks

@rohitpal440
Copy link

Hi @harish6989 ,
Will raise this issue on a separate thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants