diff --git a/MBXPageController.xcodeproj/project.pbxproj b/MBXPageController.xcodeproj/project.pbxproj
index fbe3fa4..eb2c5be 100644
--- a/MBXPageController.xcodeproj/project.pbxproj
+++ b/MBXPageController.xcodeproj/project.pbxproj
@@ -229,7 +229,7 @@
isa = PBXProject;
attributes = {
CLASSPREFIX = MBX;
- LastUpgradeCheck = 0610;
+ LastUpgradeCheck = 0730;
ORGANIZATIONNAME = Moblox;
TargetAttributes = {
2E9DE2C51A47F04A0088A0A6 = {
@@ -335,6 +335,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
@@ -397,6 +398,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = MBXPageController/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = "com.Moblox.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
@@ -407,6 +409,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = MBXPageController/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = "com.Moblox.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
@@ -425,6 +428,7 @@
);
INFOPLIST_FILE = MBXPageControllerTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = "com.Moblox.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MBXPageController.app/MBXPageController";
};
@@ -440,6 +444,7 @@
);
INFOPLIST_FILE = MBXPageControllerTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = "com.Moblox.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MBXPageController.app/MBXPageController";
};
diff --git a/MBXPageController/FreeButtonsDemo/MBXFreeButtonsViewController.m b/MBXPageController/FreeButtonsDemo/MBXFreeButtonsViewController.m
index 02d14a3..f42c032 100644
--- a/MBXPageController/FreeButtonsDemo/MBXFreeButtonsViewController.m
+++ b/MBXPageController/FreeButtonsDemo/MBXFreeButtonsViewController.m
@@ -27,7 +27,7 @@ - (void)viewDidLoad {
// Initiate MBXPageController
MBXPageViewController *MBXPageController = [MBXPageViewController new];
MBXPageController.MBXDataSource = self;
- [MBXPageController reloadPagesToCurrentPageIndex:0];
+ [MBXPageController reloadPages];
}
#pragma mark - MBXPageViewController Data Source
diff --git a/MBXPageController/Info.plist b/MBXPageController/Info.plist
index b04e174..6905cc6 100644
--- a/MBXPageController/Info.plist
+++ b/MBXPageController/Info.plist
@@ -7,7 +7,7 @@
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
- com.Moblox.$(PRODUCT_NAME:rfc1034identifier)
+ $(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
diff --git a/MBXPageController/LeftRightArrows/MBXLeftRightViewController.m b/MBXPageController/LeftRightArrows/MBXLeftRightViewController.m
index 6eded9f..fca1875 100644
--- a/MBXPageController/LeftRightArrows/MBXLeftRightViewController.m
+++ b/MBXPageController/LeftRightArrows/MBXLeftRightViewController.m
@@ -29,11 +29,10 @@ - (void)viewDidLoad {
self.MBXPageController.MBXDataSource = self;
self.MBXPageController.MBXDataDelegate = self;
self.MBXPageController.pageMode = MBX_LeftRightArrows;
- [self.MBXPageController reloadPagesToCurrentPageIndex:0];
+ [self.MBXPageController reloadPages];
}
- (IBAction)goToThirdScreen:(id)sender {
-
[self.MBXPageController moveToViewNumber:2 animated:true];
}
@@ -78,15 +77,10 @@ - (NSArray *)MBXPageControllers
#pragma mark - MBXPageViewController Delegate
-- (void)MBXPageChangedToIndex:(NSInteger)index
-{
+- (void)MBXPageChangedToIndex:(NSInteger)index {
NSInteger humanizeIndex = index + 1;
self.currentIndicator.text = [NSString stringWithFormat:@"%li", (long)humanizeIndex];
NSLog(@"%@ %ld", [self class], (long)index);
}
--(void)MBXPageChanged {
- NSLog(@"teste");
-}
-
@end
diff --git a/MBXPageController/MBXPageViewController/MBXPageViewController.h b/MBXPageController/MBXPageViewController/MBXPageViewController.h
index 243b465..ea52fb1 100644
--- a/MBXPageController/MBXPageViewController/MBXPageViewController.h
+++ b/MBXPageController/MBXPageViewController/MBXPageViewController.h
@@ -24,7 +24,10 @@ typedef NS_ENUM(NSInteger, MBXPageMode) {
@property (nonatomic, assign) MBXPageMode pageMode; // This selects the mode of the PageViewController
-- (void)reloadPagesToCurrentPageIndex:(NSInteger)currentPageIndex; // Like reloadData in tableView. You need to call this method to update the stack of viewcontrollers and/or buttons
+- (void)reloadPages; // Like reloadData in tableView. You need to call this method to update the stack of viewcontrollers and/or buttons
+- (void)reloadPagesToCurrentPageIndex:(NSInteger)currentPageIndex; // Like reloadData in tableView. You need to call this method to update the stack of viewcontrollers and/or buttons
+
+- (void)moveToViewNumber:(NSInteger)viewNumber __attribute__((deprecated)); // Default to YES. Deprecated.
- (void)moveToViewNumber:(NSInteger)viewNumber animated:(BOOL)animated; // The ViewController position. Starts from 0
@end
diff --git a/MBXPageController/MBXPageViewController/MBXPageViewController.m b/MBXPageController/MBXPageViewController/MBXPageViewController.m
index cb539d7..5b5a8f9 100644
--- a/MBXPageController/MBXPageViewController/MBXPageViewController.m
+++ b/MBXPageController/MBXPageViewController/MBXPageViewController.m
@@ -44,6 +44,10 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
#pragma mark - Public
+- (void)reloadPages {
+ [self reloadPagesToCurrentPageIndex:0];
+}
+
- (void)reloadPagesToCurrentPageIndex:(NSInteger)currentPageIndex {
// Initialize/ Refresh everything
self.currentPageIndex = currentPageIndex;
@@ -61,6 +65,10 @@ - (void)otherConfiguration {
// Replace me
}
+- (void)moveToViewNumber:(NSInteger)viewNumber {
+ [self moveToViewNumber:viewNumber animated:YES];
+}
+
- (void)moveToViewNumber:(NSInteger)viewNumber animated:(BOOL)animated {
NSAssert([_viewControllerArray count] > viewNumber, @"viewNumber exceeds the number of current viewcontrollers");
id viewController = _viewControllerArray[viewNumber];
diff --git a/MBXPageController/Main.storyboard b/MBXPageController/Main.storyboard
index 94a00ff..e284ead 100755
--- a/MBXPageController/Main.storyboard
+++ b/MBXPageController/Main.storyboard
@@ -1,7 +1,8 @@
-
+
-
+
+
@@ -16,17 +17,17 @@
-
@@ -95,7 +87,7 @@
-
+
@@ -186,8 +178,10 @@
+
+
+
+
@@ -267,7 +263,7 @@
-
+
@@ -337,12 +333,14 @@
+
-
+
+
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -470,9 +456,4 @@
-
-
-
-
-
diff --git a/MBXPageController/UISegmentController/MBXSegmentControllerExampleViewController.m b/MBXPageController/UISegmentController/MBXSegmentControllerExampleViewController.m
index 7d8aabe..368ef13 100644
--- a/MBXPageController/UISegmentController/MBXSegmentControllerExampleViewController.m
+++ b/MBXPageController/UISegmentController/MBXSegmentControllerExampleViewController.m
@@ -27,7 +27,7 @@ - (void)viewDidLoad {
self.MBXPageController.MBXDataSource = self;
self.MBXPageController.MBXDataDelegate = self;
self.MBXPageController.pageMode = MBX_SegmentController;
- [self.MBXPageController reloadPagesToCurrentPageIndex:0];
+ [self.MBXPageController reloadPages];
}
- (IBAction)goToThirdView:(id)sender {
diff --git a/MBXPageControllerTests/Info.plist b/MBXPageControllerTests/Info.plist
index ee76342..ba72822 100644
--- a/MBXPageControllerTests/Info.plist
+++ b/MBXPageControllerTests/Info.plist
@@ -7,7 +7,7 @@
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
- com.Moblox.$(PRODUCT_NAME:rfc1034identifier)
+ $(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName