Skip to content

widthForComponent not setting desired width #19

@serjooo

Description

@serjooo

I am attempting to set a custom width for devices > 375 technically ipads to take a specific amount of width but not matter the width I return the drop down menu's width stays at I guess the default size. In addition, I have set the setUseFullScreenWidth to NO on viewDidLoad, if that makes any difference. This is the code I am using and a screenshot of the simulator on ipadAir2 is attached as well

- (CGFloat)dropdownMenu:(MKDropdownMenu *)dropdownMenu widthForComponent:(NSInteger)component {
    if(self.view.frame.size.width > 375) {
        [dropdownMenu setUseFullScreenWidth:NO];
        return 100.0;
    } else {
        [dropdownMenu setUseFullScreenWidth:YES];
        return 0;
    }
}

simulator screen shot mar 6 2017 1 50 40 pm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions