更改MFSide菜单表高度问题

时间:2016-09-20 12:58:19

标签: ios iphone

我在Objective C中使用了MFSide菜单。但是当textView编辑时,SideMenu中表格的高度增加了。我不知道发生了什么问题。有人可以帮帮我吗?

1 个答案:

答案 0 :(得分:0)

MFSideMenuContainerViewController.m类文件中手动设置框架。

#pragma mark -
#pragma mark - Side Menu Positioning

- (void) setLeftSideMenuFrameToClosedPosition {

    if(!self.leftMenuViewController) return;

    CGRect leftFrame = [self.leftMenuViewController view].frame;

    //set the frame manually
    leftFrame.size.height = [UIScreen mainScreen].bounds.size.height;

    leftFrame.size.width = self.leftMenuWidth;
    leftFrame.origin.x = (self.menuSlideAnimationEnabled) ? -1*leftFrame.size.width / self.menuSlideAnimationFactor : 0;
    leftFrame.origin.y = 0;
    [self.leftMenuViewController view].frame = leftFrame;
    [self.leftMenuViewController view].autoresizingMask =  UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleHeight;
}