Skip to content

Commit 5c25a1a

Browse files
committed
Merge branch 'develop-2'
2 parents 0ee49a3 + ad70207 commit 5c25a1a

7 files changed

Lines changed: 40 additions & 46 deletions

File tree

Example/MagazineViewController.xcodeproj/project.pbxproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
0D7D97821D999E52001ECAEE /* UIViewController+Demo.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D7D97811D999E52001ECAEE /* UIViewController+Demo.m */; };
1011
6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
1112
6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; };
1213
6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
@@ -35,6 +36,8 @@
3536

3637
/* Begin PBXFileReference section */
3738
03AD2F8141F035E26CBE5FE7 /* Pods-MagazineViewController_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MagazineViewController_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-MagazineViewController_Tests/Pods-MagazineViewController_Tests.debug.xcconfig"; sourceTree = "<group>"; };
39+
0D7D97801D999E52001ECAEE /* UIViewController+Demo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+Demo.h"; sourceTree = "<group>"; };
40+
0D7D97811D999E52001ECAEE /* UIViewController+Demo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+Demo.m"; sourceTree = "<group>"; };
3841
103DC32985A4B577FFA994A7 /* Pods_MagazineViewController_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MagazineViewController_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3942
447362CE5BE03FC13F49DF83 /* Pods-MagazineViewController_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MagazineViewController_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-MagazineViewController_Example/Pods-MagazineViewController_Example.release.xcconfig"; sourceTree = "<group>"; };
4043
4E9746E22EA7BA28A7B4924F /* Pods-MagazineViewController_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MagazineViewController_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-MagazineViewController_Example/Pods-MagazineViewController_Example.debug.xcconfig"; sourceTree = "<group>"; };
@@ -140,6 +143,8 @@
140143
6003F59D195388D20070C39A /* MGZAppDelegate.m */,
141144
6003F5A8195388D20070C39A /* Images.xcassets */,
142145
6003F594195388D20070C39A /* Supporting Files */,
146+
0D7D97801D999E52001ECAEE /* UIViewController+Demo.h */,
147+
0D7D97811D999E52001ECAEE /* UIViewController+Demo.m */,
143148
);
144149
name = "Example for MagazineViewController";
145150
path = MagazineViewController;
@@ -381,6 +386,7 @@
381386
isa = PBXSourcesBuildPhase;
382387
buildActionMask = 2147483647;
383388
files = (
389+
0D7D97821D999E52001ECAEE /* UIViewController+Demo.m in Sources */,
384390
6003F59E195388D20070C39A /* MGZAppDelegate.m in Sources */,
385391
6003F59A195388D20070C39A /* main.m in Sources */,
386392
);

Example/MagazineViewController/MGZAppDelegate.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
//
2-
// MGZAppDelegate.h
3-
// MagazineViewController
4-
//
5-
// Created by Bartek Chlebek on 09/20/2016.
6-
// Copyright (c) 2016 Bartek Chlebek. All rights reserved.
7-
//
8-
91
@import UIKit;
102

113
@interface MGZAppDelegate : UIResponder <UIApplicationDelegate>

Example/MagazineViewController/MGZAppDelegate.m

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
1-
//
2-
// MGZAppDelegate.m
3-
// MagazineViewController
4-
//
5-
// Created by Bartek Chlebek on 09/20/2016.
6-
// Copyright (c) 2016 Bartek Chlebek. All rights reserved.
7-
//
8-
91
#import "MGZAppDelegate.h"
2+
#import "UIViewController+Demo.h"
103
@import MagazineViewController;
114

125
@interface MGZAppDelegate () <MGZPageViewControllerDataSource>
@@ -45,9 +38,10 @@ - (NSArray *)viewControllers
4538
}
4639

4740
_viewControllers = @[
48-
[self newViewControllerWithColor:[UIColor redColor]],
49-
[[UINavigationController alloc] initWithRootViewController:[UITableViewController new]],
50-
[self newImageViewController],
41+
[UIViewController viewControllerWithText:@"Page 1"],
42+
[UIViewController viewControllerWithText:@"Page 2"],
43+
[UIViewController viewControllerWithText:@"Page 3"],
44+
[UIViewController viewControllerWithText:@"Page 4"],
5145
];
5246

5347
return _viewControllers;
@@ -70,29 +64,4 @@ - (BOOL)shouldDisplayPageIndicator
7064
return YES;
7165
}
7266

73-
#pragma mark - Helpers
74-
75-
- (UIViewController *)newViewControllerWithColor:(UIColor *)color
76-
{
77-
UIViewController *vc = [UIViewController new];
78-
vc.view.backgroundColor = [UIColor redColor];
79-
return vc;
80-
}
81-
82-
- (UIViewController *)newImageViewController
83-
{
84-
UIViewController *vc = [UIViewController new];
85-
86-
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"img"]];
87-
imageView.frame = vc.view.bounds;
88-
imageView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
89-
[vc.view addSubview:imageView];
90-
91-
UIView *orangeView = [[UIView alloc] initWithFrame:CGRectMake(10, 10, 50, 50)];
92-
orangeView.backgroundColor = [UIColor orangeColor];
93-
[vc.view addSubview:orangeView];
94-
95-
return vc;
96-
}
97-
9867
@end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@import UIKit;
2+
3+
@interface UIViewController (Demo)
4+
+ (instancetype)viewControllerWithText:(NSString *)text;
5+
@end
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#import "UIViewController+Demo.h"
2+
3+
@implementation UIViewController (Demo)
4+
5+
+ (instancetype)viewControllerWithText:(NSString *)text
6+
{
7+
UIViewController *viewController = [UIViewController new];
8+
9+
viewController.view.backgroundColor = [UIColor lightGrayColor];
10+
11+
UILabel *label = [UILabel new];
12+
label.frame = viewController.view.bounds;
13+
label.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
14+
label.text = text;
15+
label.font = [UIFont boldSystemFontOfSize:48];
16+
label.textAlignment = NSTextAlignmentCenter;
17+
[viewController.view addSubview:label];
18+
19+
return viewController;
20+
}
21+
22+
@end

MagazineViewController.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Pod::Spec.new do |s|
88

99
s.homepage = 'https://github.com/macoscope/MagazineViewController'
1010
s.license = { :type => 'MIT', :file => 'LICENSE' }
11-
s.author = { 'Macoscope' => 'bartek.chlebek@gmail.com' }
11+
s.author = { 'Macoscope' => 'info@macoscope.com' }
1212
s.source = { :git => 'https://github.com/macoscope/MagazineViewController.git', :tag => s.version.to_s }
1313
s.social_media_url = 'https://twitter.com/macoscope'
1414

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pod 'MagazineViewController', :git => 'https://github.com/macoscope/MagazineView
1414

1515
## Author
1616

17-
[Macoscope](http://www.macoscope.com), [bartek@macoscope.com](bartek@macoscope.com)
17+
[Macoscope](http://www.macoscope.com), [info@macoscope.com](info@macoscope.com)
1818

1919
## License
2020

0 commit comments

Comments
 (0)