From e37c130bced9c040442d168174305a78756576fb Mon Sep 17 00:00:00 2001 From: Paul Gardiner Date: Fri, 22 Nov 2013 13:34:21 +0000 Subject: iOS: fix white-space inconsistency --- platform/ios/Classes/MuChoiceFieldController.m | 12 ++++++------ platform/ios/Classes/MuInkView.m | 10 +++++----- platform/ios/Classes/MuPageViewNormal.m | 9 ++------- platform/ios/Classes/MuPageViewReflow.m | 8 ++++---- platform/ios/Classes/MuTextFieldController.m | 12 ++++++------ 5 files changed, 23 insertions(+), 28 deletions(-) (limited to 'platform') diff --git a/platform/ios/Classes/MuChoiceFieldController.m b/platform/ios/Classes/MuChoiceFieldController.m index ffd4c212..d32383b6 100644 --- a/platform/ios/Classes/MuChoiceFieldController.m +++ b/platform/ios/Classes/MuChoiceFieldController.m @@ -27,24 +27,24 @@ - (void)viewDidLoad { - [super viewDidLoad]; + [super viewDidLoad]; _picker.dataSource = self; _picker.delegate = self; - // Do any additional setup after loading the view from its nib. + // Do any additional setup after loading the view from its nib. } - (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. } - (void)dealloc { [okayBlock release]; [choices release]; - [_picker release]; - [super dealloc]; + [_picker release]; + [super dealloc]; } - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView diff --git a/platform/ios/Classes/MuInkView.m b/platform/ios/Classes/MuInkView.m index 6ac4d1dc..4ad9f872 100644 --- a/platform/ios/Classes/MuInkView.m +++ b/platform/ios/Classes/MuInkView.m @@ -12,17 +12,17 @@ - (id) initWithPageSize:(CGSize)_pageSize { - self = [super initWithFrame:CGRectMake(0, 0, 100, 100)]; - if (self) { + self = [super initWithFrame:CGRectMake(0, 0, 100, 100)]; + if (self) { [self setOpaque:NO]; - pageSize = _pageSize; + pageSize = _pageSize; color = [[UIColor colorWithRed:1.0 green:0.0 blue:0.0 alpha:1.0] retain]; curves = [[NSMutableArray array] retain]; UIPanGestureRecognizer *rec = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(onDrag:)]; [self addGestureRecognizer:rec]; [rec release]; - } - return self; + } + return self; } @synthesize curves; diff --git a/platform/ios/Classes/MuPageViewNormal.m b/platform/ios/Classes/MuPageViewNormal.m index c2f609c9..d240592d 100644 --- a/platform/ios/Classes/MuPageViewNormal.m +++ b/platform/ios/Classes/MuPageViewNormal.m @@ -43,13 +43,8 @@ static UIImage *newImageWithPixmap(fz_pixmap *pix, CGDataProviderRef cgdata) int w = fz_pixmap_width(ctx, pix); int h = fz_pixmap_height(ctx, pix); CGColorSpaceRef cgcolor = CGColorSpaceCreateDeviceRGB(); - CGImageRef cgimage = CGImageCreate(w, h, 8, 32, 4 * w, - cgcolor, kCGBitmapByteOrderDefault, - cgdata, NULL, NO, kCGRenderingIntentDefault); - UIImage *image = [[UIImage alloc] - initWithCGImage: cgimage - scale: screenScale - orientation: UIImageOrientationUp]; + CGImageRef cgimage = CGImageCreate(w, h, 8, 32, 4 * w, cgcolor, kCGBitmapByteOrderDefault, cgdata, NULL, NO, kCGRenderingIntentDefault); + UIImage *image = [[UIImage alloc] initWithCGImage: cgimage scale: screenScale orientation: UIImageOrientationUp]; CGColorSpaceRelease(cgcolor); CGImageRelease(cgimage); return image; diff --git a/platform/ios/Classes/MuPageViewReflow.m b/platform/ios/Classes/MuPageViewReflow.m index feb64225..d5c6101b 100644 --- a/platform/ios/Classes/MuPageViewReflow.m +++ b/platform/ios/Classes/MuPageViewReflow.m @@ -85,8 +85,8 @@ NSString *textAsHtml(fz_document *doc, int pageNum) - (id)initWithFrame:(CGRect)frame document:(MuDocRef *)aDoc page:(int)aNumber { - self = [super initWithFrame:frame]; - if (self) { + self = [super initWithFrame:frame]; + if (self) { number = aNumber; scale = 1.0; self.scalesPageToFit = NO; @@ -97,8 +97,8 @@ NSString *textAsHtml(fz_document *doc, int pageNum) [self loadHTMLString:cont baseURL:nil]; }); }); - } - return self; + } + return self; } -(void) webViewDidFinishLoad:(UIWebView *)webView diff --git a/platform/ios/Classes/MuTextFieldController.m b/platform/ios/Classes/MuTextFieldController.m index e0864ff4..45e53054 100644 --- a/platform/ios/Classes/MuTextFieldController.m +++ b/platform/ios/Classes/MuTextFieldController.m @@ -25,23 +25,23 @@ - (void)viewDidLoad { - [super viewDidLoad]; + [super viewDidLoad]; _textView.text = initialText; - // Do any additional setup after loading the view from its nib. + // Do any additional setup after loading the view from its nib. } - (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. } - (void)dealloc { [okayBlock release]; [initialText release]; - [_textView release]; - [super dealloc]; + [_textView release]; + [super dealloc]; } - (IBAction)okayTapped:(id)sender -- cgit v1.2.3