weixin_39989190
weixin_39989190
2021-01-12 14:18

ChildViewController ViewWillAppear and DidAppear is not getting called!!!!

How to customise the width of the childViewController ?

该提问来源于开源项目:PageMenu/PageMenu

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答

  • weixin_39989190 weixin_39989190 4月前

    thanks man it works for me.

    点赞 评论 复制链接分享
  • weixin_39521520 weixin_39521520 4月前

    thanks it worked for me

    点赞 评论 复制链接分享
  • weixin_39886841 weixin_39886841 4月前

    Same here

    点赞 评论 复制链接分享
  • weixin_39886841 weixin_39886841 4月前

    Ok here is the solution (worked for me): https://github.com/HighBay/PageMenu/issues/133

    点赞 评论 复制链接分享
  • weixin_39859220 weixin_39859220 4月前

    Hi all,

    I managed to get the viewDidAppear() method to fire by changing code in the parent view (i.e. the view controller that the CAPSPageMenu is being added):

    Original example code (not working):

     swift
    // Lastly add page menu as subview of base view controller view
    // or use pageMenu controller in you view hierachy as desired
    self.view.addSubview(pageMenu!.view)
    

    Working code:

     swift
    // Lastly add page menu as subview of base view controller view
    // or use pageMenu controller in you view hierachy as desired
    self.addChildViewController(pageMenu!)
    self.view.addSubview(pageMenu!.view)
    pageMenu!.didMoveToParentViewController(self)
    
    点赞 评论 复制链接分享

相关推荐