mirror of
https://github.com/TextureGroup/Texture.git
synced 2026-04-07 19:17:39 +00:00
Having a semi-colon between a method parameters list and a method
body is not not correct and is usually caused by a copy and paste
error while creating the method definition from its declaration.
Fixes the following compilation warnings when building with
-Wsemicolon-before-method-body (which is part of -Wextra):
ASPINRemoteImageDownloader.mm:230:85: error: semicolon before method body is ignored [-Werror,-Wsemicolon-before-method-body]
- (id <ASImageContainerProtocol>)synchronouslyFetchedCachedImageWithURL:(NSURL *)URL;
^
ASPINRemoteImageDownloader.mm:275:76: error: semicolon before method body is ignored [-Werror,-Wsemicolon-before-method-body]
completion:(ASImageDownloaderCompletion)completion;
^
2 errors generated.
Fixes applied to both code, examples and samples in documentation.
49 lines
1.0 KiB
Objective-C
49 lines
1.0 KiB
Objective-C
//
|
|
// ImageViewController.m
|
|
// Texture
|
|
//
|
|
// Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
|
|
// Changes after 4/13/2017 are: Copyright (c) Pinterest, Inc. All rights reserved.
|
|
// Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
|
|
|
|
#import "ImageViewController.h"
|
|
|
|
@interface ImageViewController ()
|
|
@property (nonatomic) UIImageView *imageView;
|
|
@end
|
|
|
|
@implementation ImageViewController
|
|
|
|
- (instancetype)initWithImage:(UIImage *)image {
|
|
if (!(self = [super init])) { return nil; }
|
|
|
|
self.imageView = [[UIImageView alloc] initWithImage:image];
|
|
|
|
return self;
|
|
}
|
|
|
|
- (void)viewDidLoad {
|
|
[super viewDidLoad];
|
|
|
|
[self.view addSubview:self.imageView];
|
|
|
|
UIGestureRecognizer *tap = [[UIGestureRecognizer alloc] initWithTarget:self action:@selector(tapped)];
|
|
[self.view addGestureRecognizer:tap];
|
|
|
|
self.imageView.contentMode = UIViewContentModeScaleAspectFill;
|
|
}
|
|
|
|
- (void)tapped
|
|
{
|
|
NSLog(@"tapped!");
|
|
}
|
|
|
|
- (void)viewWillLayoutSubviews
|
|
{
|
|
self.imageView.frame = self.view.bounds;
|
|
}
|
|
|
|
@end
|