Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.
This repository was archived by the owner on May 28, 2025. It is now read-only.

UIBarButtonItems on the right side of the UINavigationBar is cropped #360

Open
@cre8ivepark

Description

@cre8ivepark

I have added some UI elements on the right side of the UINavigationBar. It is cropped on Windows. Even though you resize the window, it maintains cropped state. I am including the code and screen shots:

//Add button to NavigationController
UIBarButtonItem *btnLorem = [[UIBarButtonItem alloc] initWithTitle:@"Lorem" style:UIBarButtonItemStylePlain target:self action:@selector(showLorem:)];
UIBarButtonItem *btnWaterfall = [[UIBarButtonItem alloc] initWithTitle:@"Waterfall" style:UIBarButtonItemStylePlain target:self action:@selector(showWaterfall:)];
slFontSize = [[UISlider alloc] initWithFrame:CGRectMake(0, 0, 180, 50)];
[slFontSize addTarget:self action:@selector(changeFontSize:) forControlEvents:UIControlEventValueChanged];
slFontSize.backgroundColor = [UIColor clearColor];
slFontSize.minimumValue = 60.0;
slFontSize.maximumValue = 700.0;
slFontSize.continuous = YES;
slFontSize.value = 160.0;

UIBarButtonItem *scrubberItem = [[UIBarButtonItem alloc] initWithCustomView:slFontSize];


NSArray *buttonArray = [NSArray arrayWithObjects:btnLorem, btnWaterfall, scrubberItem, nil];
self.navigationItem.rightBarButtonItems = buttonArray;

uinavigationbarbuttonitems

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions