I used this code(in UIView class).
- (void)setup {
self.backgroundColor = [UIColor colorWithWhite:0.12f alpha:1.0f];
_doneTextButton = [UIButton buttonWithType:UIButtonTypeCustom];
_doneTextButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
[_doneTextButton setTitle:@"Save" forState:UIControlStateNormal];
[_doneTextButton setTitleColor:CODE_A_COLOR forState:UIControlStateNormal];
[_doneTextButton setBackgroundColor:CODE_6_COLOR] ;
[_doneTextButton.titleLabel setFont:[FontManager getOpenSansBoldFontWithSize:16]];
[_doneTextButton addTarget:self action:@selector(buttonTapped:) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:_doneTextButton];
}
I am getting this output(buttons at corner).
I want this "Cancel" and "Save" button exactly fit equally in UIView
I am using third party lib. and no idea straight logic not working.How do i set frame of both buttons? expecting autoLayout code. thanks in advance.