mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Move QR code scanning to a separate view.
// FREEBIE
This commit is contained in:
parent
5264602106
commit
051b005582
|
@ -2535,7 +2535,7 @@ typedef enum : NSUInteger {
|
|||
|
||||
- (void)createScrollDownButton
|
||||
{
|
||||
const CGFloat kScrollDownButtonSize = round(ScaleFromIPhone5To7Plus(35.f, 40.f));
|
||||
const CGFloat kScrollDownButtonSize = ScaleFromIPhone5To7Plus(35.f, 40.f);
|
||||
UIButton *scrollDownButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
self.scrollDownButton = scrollDownButton;
|
||||
scrollDownButton.backgroundColor = [UIColor colorWithWhite:0.95f alpha:1.f];
|
||||
|
|
|
@ -79,15 +79,16 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
UILabel *cameraInstructionLabel = [UILabel new];
|
||||
cameraInstructionLabel.text
|
||||
= NSLocalizedString(@"SCAN_CODE_INSTRUCTIONS", @"label presented once scanning (camera) view is visible.");
|
||||
cameraInstructionLabel.font = [UIFont ows_regularFontWithSize:14.f];
|
||||
cameraInstructionLabel.font = [UIFont ows_regularFontWithSize:ScaleFromIPhone5To7Plus(14.f, 18.f)];
|
||||
cameraInstructionLabel.textColor = [UIColor whiteColor];
|
||||
cameraInstructionLabel.textAlignment = NSTextAlignmentCenter;
|
||||
cameraInstructionLabel.numberOfLines = 0;
|
||||
cameraInstructionLabel.lineBreakMode = NSLineBreakByWordWrapping;
|
||||
[footer addSubview:cameraInstructionLabel];
|
||||
[cameraInstructionLabel autoPinWidthToSuperviewWithMargin:16.f];
|
||||
[cameraInstructionLabel autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:10.f];
|
||||
[cameraInstructionLabel autoPinEdgeToSuperviewEdge:ALEdgeTop withInset:10.f];
|
||||
[cameraInstructionLabel autoPinWidthToSuperviewWithMargin:ScaleFromIPhone5To7Plus(16.f, 30.f)];
|
||||
CGFloat instructionsVMargin = ScaleFromIPhone5To7Plus(10.f, 20.f);
|
||||
[cameraInstructionLabel autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:instructionsVMargin];
|
||||
[cameraInstructionLabel autoPinEdgeToSuperviewEdge:ALEdgeTop withInset:instructionsVMargin];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated
|
||||
|
|
|
@ -57,8 +57,8 @@
|
|||
[maskingView setConfigureShapeLayerBlock:^(CAShapeLayer *layer, CGRect bounds) {
|
||||
// Add a circular mask
|
||||
UIBezierPath *path = [UIBezierPath bezierPathWithRect:bounds];
|
||||
CGFloat verticalMargin = 8.0;
|
||||
CGFloat radius = MIN(bounds.size.width, bounds.size.height) * 0.5f - verticalMargin;
|
||||
CGFloat margin = ScaleFromIPhone5To7Plus(8.f, 16.f);
|
||||
CGFloat radius = MIN(bounds.size.width, bounds.size.height) * 0.5f - margin;
|
||||
|
||||
// Center the circle's bounding rectangle
|
||||
CGRect circleRect = CGRectMake(
|
||||
|
|
Loading…
Reference in a new issue