ios - UIImagePickerController, custom UIButton and AutoLayout -
I'm trying to put a custom button in the UIImagePickerController using the lack of auto-layout;
- (zero) createTimerButtonFor: (UIImagePickerController *) picker {UIButton * button = [UIButton buttonWithType: UIButtonTypeCustom]; [Button Settital: @ State for "Timer": UControllStateAnimal]; NSLayoutConstraint * constraint1 = [NSLayoutConstraint constraintWithItem: picker.view feature: NSLayoutAttributeCenterX relatedBy: NSLayoutRelationEqual toItem: Button feature: NSLayoutAttributeCenterX multiplier: 1 constant: 0]; NSLayoutConstraint * constraint2 = [NSLayoutConstraint constraintWithItem: picker.view feature: NSLayoutAttributeTop relatedBy: NSLayoutRelationEqual toItem: Button feature: NSLayoutAttributeTop multiplier: 1 constant: 0]; NSLayoutConstraint * heightConstraint = [NSLayoutConstraint constraintWithItem: Button feature: NSLayoutAttributeHeight relatedBy: NSLayoutRelationEqual toItem: nil attribute: NSLayoutAttributeNotAnAttribute multiplier: 1.0 constant: 100.0]; NSLayoutConstraint * widthConstraint = [NSLayoutConstraint constraintWithItem: Button feature: NSLayoutAttributeWidth relatedBy: NSLayoutRelationEqual toItem: nil attribute: NSLayoutAttributeNotAnAttribute multiplier: 1.0 constant: 100.0]; [Invoice options] AddSubview: button]; [Picker. Endorsement: barrier 1]; [Elapsed. Add View Hint: Obligate 2]; [Add button: height restraint]; [Add button tool: width control]; } Is this also possible? Am I doing something wrong?
Dejiar, I see that the button would be very difficult to add picker and transfer it to you Give autolayout for I think that it can not use fully automatic layout
I have tried to disable the rotation, but for the first iOS 8 work properly on all the tricks iOS 8 Are not doing
This is an overlay view and buttons in your overlay view because you have full control of the overlay view class.
Comments
Post a Comment