-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from mrackwitz/fix/38_stop_small_hit_area
Fix #38: Ensure a min hit area for stop buttons
- Loading branch information
Showing
5 changed files
with
122 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// MRStopButtonMinHitAreaViewController.h | ||
// Example | ||
// | ||
// Created by Marius Rackwitz on 02/09/14. | ||
// Copyright (c) 2014 Marius Rackwitz. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface MRStopButtonMinHitAreaViewController : UIViewController | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// | ||
// MRStopButtonMinHitAreaViewController.m | ||
// Example | ||
// | ||
// Created by Marius Rackwitz on 02/09/14. | ||
// Copyright (c) 2014 Marius Rackwitz. All rights reserved. | ||
// | ||
|
||
#import "MRStopButtonMinHitAreaViewController.h" | ||
#import <MRProgress/MRProgress.h> | ||
|
||
|
||
@interface MRStopButtonMinHitAreaViewController () | ||
|
||
@property (weak, nonatomic) IBOutlet MRActivityIndicatorView *activityIndicatorView; | ||
@property (weak, nonatomic) IBOutlet MRCircularProgressView *circularProgressView; | ||
|
||
@end | ||
|
||
|
||
@implementation MRStopButtonMinHitAreaViewController | ||
|
||
- (void)viewDidLoad { | ||
[super viewDidLoad]; | ||
|
||
self.activityIndicatorView.mayStop = YES; | ||
self.circularProgressView.mayStop = YES; | ||
|
||
[self.activityIndicatorView.stopButton addTarget:self action:@selector(onStop:) forControlEvents:UIControlEventTouchUpInside]; | ||
[self.circularProgressView.stopButton addTarget:self action:@selector(onStop:) forControlEvents:UIControlEventTouchUpInside]; | ||
} | ||
|
||
- (void)onStop:(UIButton *)button { | ||
NSLog(@"Did triggered."); | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters