diff --git a/Example/MEVFloatingButton/MEVAppDelegate.m b/Example/MEVFloatingButton/MEVAppDelegate.m
index 199c9b4..8d951ca 100644
--- a/Example/MEVFloatingButton/MEVAppDelegate.m
+++ b/Example/MEVFloatingButton/MEVAppDelegate.m
@@ -13,10 +13,29 @@ @implementation MEVAppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
+ // Status bar
+ [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
+ UIView *statusBar = [[[UIApplication sharedApplication] valueForKey:@"statusBarWindow"] valueForKey:@"statusBar"];
+ if ([statusBar respondsToSelector:@selector(setBackgroundColor:)]) {
+ statusBar.backgroundColor = [UIColor colorWithRed:33/255.0f green:194/255.0f blue:103/255.0f alpha:1];
+ }
+
+ // Navigation bar appearance (background and title)
+ [[UINavigationBar appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor], NSForegroundColorAttributeName, nil]];
+ [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
+ [[UINavigationBar appearance] setBarTintColor:[UIColor colorWithRed:43/255.0f green:204/255.0f blue:113/255.0f alpha:1]];
+ [[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];
+ [[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]];
+ [[UINavigationBar appearance] setBackgroundColor:[UIColor colorWithRed:43/255.0f green:204/255.0f blue:113/255.0f alpha:1]];
+
+
MEVViewController *viewController = [[MEVViewController alloc] init];
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:viewController];
[self.window makeKeyAndVisible];
+
+
+
return YES;
}
diff --git a/Example/MEVFloatingButton/MEVExample1ViewController.m b/Example/MEVFloatingButton/MEVExample1ViewController.m
index 760261a..3f7a7ab 100644
--- a/Example/MEVFloatingButton/MEVExample1ViewController.m
+++ b/Example/MEVFloatingButton/MEVExample1ViewController.m
@@ -27,9 +27,9 @@ - (void)viewDidLoad {
button.displayMode = MEVFloatingButtonDisplayModeAlways;
button.position = MEVFloatingButtonPositionBottomRight;
button.image = [UIImage imageNamed:@"Icon1"];
- button.imageColor = [UIColor blackColor];
- button.backgroundColor = [UIColor redColor];
- button.outlineColor = [UIColor blackColor];
+ button.imageColor = [UIColor colorWithRed:44/255.0f green:62/255.0f blue:80/255.0f alpha:1];
+ button.backgroundColor = [UIColor colorWithRed:65/255.0f green:131/255.0f blue:215/255.0f alpha:1];
+ button.outlineColor = [UIColor colorWithRed:44/255.0f green:62/255.0f blue:80/255.0f alpha:1];
button.outlineWidth = 3.0f;
button.imagePadding = 20.0f;
button.horizontalOffset = -30.0f;
@@ -42,6 +42,7 @@ - (void)viewDidLoad {
[self.tableView setFloatingButtonView:button];
[self.tableView setFloatingButtonDelegate:self];
+ [self.tableView setBackgroundColor:[UIColor colorWithRed:236/255.0f green:236/255.0f blue:236/255.0f alpha:1]];
[self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:CellIdentifier];
}
@@ -64,7 +65,9 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+ [cell setBackgroundColor:[UIColor colorWithRed:236/255.0f green:236/255.0f blue:236/255.0f alpha:1]];
cell.textLabel.text = [NSString stringWithFormat:@"Cell section [%zd] row [%zd]", indexPath.section, indexPath.row];
+ cell.textLabel.textColor = [UIColor colorWithRed:44/255.0f green:62/255.0f blue:80/255.0f alpha:1];
return cell;
}
diff --git a/Example/MEVFloatingButton/MEVExample2ViewController.m b/Example/MEVFloatingButton/MEVExample2ViewController.m
index f5c5bc6..186d8a5 100644
--- a/Example/MEVFloatingButton/MEVExample2ViewController.m
+++ b/Example/MEVFloatingButton/MEVExample2ViewController.m
@@ -26,7 +26,7 @@ - (void)viewDidLoad {
button.displayMode = MEVFloatingButtonDisplayModeWhenScrolling;
button.animationType = MEVFloatingButtonAnimationNone;
button.position = MEVFloatingButtonPositionBottomLeft;
- button.backgroundColor = [UIColor colorWithRed:0.5 green:0.5 blue:0.5 alpha:0.9];
+ button.backgroundColor = [UIColor colorWithRed:233/255.0f green:212/255.0f blue:96/255.0f alpha:0.9];
button.horizontalOffset = 30.0f;
button.verticalOffset = -30.0f;
button.image = [UIImage imageNamed:@"Icon2"];
@@ -35,6 +35,7 @@ - (void)viewDidLoad {
[self.tableView setFloatingButtonView:button];
[self.tableView setFloatingButtonDelegate:self];
+ [self.tableView setBackgroundColor:[UIColor colorWithRed:236/255.0f green:236/255.0f blue:236/255.0f alpha:1]];
[self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:CellIdentifier];
}
@@ -54,7 +55,9 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+ [cell setBackgroundColor:[UIColor colorWithRed:236/255.0f green:236/255.0f blue:236/255.0f alpha:1]];
cell.textLabel.text = [NSString stringWithFormat:@"Cell section [%zd] row [%zd]", indexPath.section, indexPath.row];
+ cell.textLabel.textColor = [UIColor colorWithRed:44/255.0f green:62/255.0f blue:80/255.0f alpha:1];
return cell;
}
diff --git a/Example/MEVFloatingButton/MEVExample3ViewController.m b/Example/MEVFloatingButton/MEVExample3ViewController.m
index d7ddb13..199cdaf 100644
--- a/Example/MEVFloatingButton/MEVExample3ViewController.m
+++ b/Example/MEVFloatingButton/MEVExample3ViewController.m
@@ -24,20 +24,22 @@ - (void)viewDidLoad {
MEVFloatingButton *button = [[MEVFloatingButton alloc] init];
button.animationType = MEVFloatingButtonAnimationFromBottom;
- button.displayMode = MEVFloatingButtonDisplayModeAlways;
+ button.displayMode = MEVFloatingButtonDisplayModeWhenScrolling;
button.position = MEVFloatingButtonPositionBottomCenter;
- button.image = [UIImage imageNamed:@"Icon6"];
- button.imageColor = [UIColor cyanColor];
- button.backgroundColor = [UIColor magentaColor];
- button.outlineColor = [UIColor cyanColor];
+ button.image = [UIImage imageNamed:@"Icon0"];
+ button.imageColor = [UIColor groupTableViewBackgroundColor];
+ button.backgroundColor = [UIColor colorWithRed:236/255.0f green:100/255.0f blue:75/255.0f alpha:1];
+ button.outlineColor = [UIColor darkGrayColor];
button.outlineWidth = 0.0f;
- button.rounded = YES;
- button.imagePadding = 15.0f;
+ button.imagePadding = 10.0f;
button.horizontalOffset = 20.0f;
button.verticalOffset = -30.0f;
+ button.rounded = YES;
+ button.hideWhenScrollToTop = YES;
[self.tableView setFloatingButtonView:button];
[self.tableView setFloatingButtonDelegate:self];
+ [self.tableView setBackgroundColor:[UIColor colorWithRed:236/255.0f green:236/255.0f blue:236/255.0f alpha:1]];
[self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:CellIdentifier];
}
@@ -56,7 +58,9 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+ [cell setBackgroundColor:[UIColor colorWithRed:236/255.0f green:236/255.0f blue:236/255.0f alpha:1]];
cell.textLabel.text = [NSString stringWithFormat:@"Cell section [%zd] row [%zd]", indexPath.section, indexPath.row];
+ cell.textLabel.textColor = [UIColor colorWithRed:44/255.0f green:62/255.0f blue:80/255.0f alpha:1];
return cell;
}
@@ -73,7 +77,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
- (void)floatingButton:(UIScrollView *)scrollView didTapButton:(UIButton *)button {
NSLog(@"didTapButton");
- [self.navigationController popViewControllerAnimated:YES];
+ [self.tableView setContentOffset:CGPointMake(0, -self.tableView.contentInset.top) animated:YES];
}
- (void)floatingButtonWillAppear:(UIScrollView *)scrollView {
diff --git a/Example/MEVFloatingButton/MEVExample4ViewController.m b/Example/MEVFloatingButton/MEVExample4ViewController.m
index f1c5359..17e4980 100644
--- a/Example/MEVFloatingButton/MEVExample4ViewController.m
+++ b/Example/MEVFloatingButton/MEVExample4ViewController.m
@@ -28,9 +28,8 @@ - (void)viewDidLoad {
button.displayMode = MEVFloatingButtonDisplayModeAlways;
button.position = MEVFloatingButtonPositionBottomRight;
button.image = [UIImage imageNamed:@"Icon3"];
- button.imageColor = [UIColor greenColor];
- button.backgroundColor = [UIColor purpleColor];
- button.outlineColor = [UIColor darkGrayColor];
+ button.imageColor = [UIColor colorWithRed:43/255.0f green:204/255.0f blue:113/255.0f alpha:1];
+ button.backgroundColor = [UIColor colorWithRed:154/255.0f green:18/255.0f blue:197/255.0f alpha:1];
button.outlineWidth = 0.0f;
button.imagePadding = 15.0f;
button.horizontalOffset = -30.0f;
@@ -65,6 +64,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
cell.textLabel.text = [NSString stringWithFormat:@"Cell section [%zd] row [%zd]", indexPath.section, indexPath.row];
+ cell.textLabel.textColor = [UIColor colorWithRed:44/255.0f green:62/255.0f blue:80/255.0f alpha:1];
return cell;
}
@@ -81,7 +81,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
- (void)floatingButton:(UIScrollView *)scrollView didTapButton:(UIButton *)button {
NSLog(@"didTapButton");
- [self.tableView setContentOffset:CGPointMake(0, -self.tableView.contentInset.top) animated:YES];
+ [self dismissViewControllerAnimated:YES completion:nil];
}
- (void)floatingButtonWillAppear:(UIScrollView *)scrollView {
diff --git a/Example/MEVFloatingButton/MEVFloatingButton-Info.plist b/Example/MEVFloatingButton/MEVFloatingButton-Info.plist
index ee6c704..0d470f7 100644
--- a/Example/MEVFloatingButton/MEVFloatingButton-Info.plist
+++ b/Example/MEVFloatingButton/MEVFloatingButton-Info.plist
@@ -1,45 +1,47 @@
-
- CFBundleDevelopmentRegion
- en
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- APPL
- CFBundleShortVersionString
- 1.0
- CFBundleSignature
- ????
- CFBundleVersion
- 1
- LSRequiresIPhoneOS
-
- UILaunchStoryboardName
- LaunchScreen
- UIRequiredDeviceCapabilities
-
- armv7
-
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
-
-
\ No newline at end of file
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1
+ LSRequiresIPhoneOS
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIViewControllerBasedStatusBarAppearance
+
+ UIRequiredDeviceCapabilities
+
+ armv7
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+
+
diff --git a/Example/MEVFloatingButton/MEVViewController.m b/Example/MEVFloatingButton/MEVViewController.m
index a9e80b2..19c692d 100644
--- a/Example/MEVFloatingButton/MEVViewController.m
+++ b/Example/MEVFloatingButton/MEVViewController.m
@@ -27,26 +27,9 @@ - (void)viewDidLoad
{
[super viewDidLoad];
-
self.title = @"MEVFloatingButton";
-
- MEVFloatingButton *button = [[MEVFloatingButton alloc] init];
- button.animationType = MEVFloatingButtonAnimationFromBottom;
- button.displayMode = MEVFloatingButtonDisplayModeWhenScrolling;
- button.position = MEVFloatingButtonPositionBottomCenter;
- button.image = [UIImage imageNamed:@"Icon0"];
- button.imageColor = [UIColor groupTableViewBackgroundColor];
- button.backgroundColor = [UIColor darkGrayColor];
- button.outlineColor = [UIColor darkGrayColor];
- button.outlineWidth = 0.0f;
- button.imagePadding = 20.0f;
- button.horizontalOffset = 20.0f;
- button.verticalOffset = -30.0f;
- button.rounded = YES;
- button.hideWhenScrollToTop = YES;
- [self.tableView setFloatingButtonView:button];
- [self.tableView setFloatingButtonDelegate:self];
-
+
+ [self.tableView setBackgroundColor:[UIColor colorWithRed:236/255.0f green:236/255.0f blue:236/255.0f alpha:1]];
[self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:CellIdentifier];
}
@@ -64,13 +47,15 @@ - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- return 40;
+ return 4;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
- cell.textLabel.text = [NSString stringWithFormat:@"Example [%zd]", indexPath.row];
+ [cell setBackgroundColor:[UIColor colorWithRed:236/255.0f green:236/255.0f blue:236/255.0f alpha:1]];
+ cell.textLabel.text = [NSString stringWithFormat:@"Example %zd", indexPath.row+1];
+ cell.textLabel.textColor = [UIColor colorWithRed:44/255.0f green:62/255.0f blue:80/255.0f alpha:1];
return cell;
}
@@ -105,28 +90,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
}
-#pragma mark - MEScrollToTopDelegate Methods
-
-- (void)floatingButton:(UIScrollView *)scrollView didTapButton:(UIButton *)button {
- NSLog(@"didTapButton");
- [self.tableView setContentOffset:CGPointMake(0, -self.tableView.contentInset.top) animated:YES];
-}
-
-- (void)floatingButtonWillAppear:(UIScrollView *)scrollView {
- NSLog(@"floatingButtonWillAppear");
-}
-
-- (void)floatingButtonDidAppear:(UIScrollView *)scrollView {
- NSLog(@"floatingButtonDidAppear");
-}
-
-- (void)floatingButtonWillDisappear:(UIScrollView *)scrollView {
- NSLog(@"floatingButtonWillDisappear");
-}
-
-- (void)floatingButtonDidDisappear:(UIScrollView *)scrollView; {
- NSLog(@"floatingButtonDidDisappear");
-}
@end