Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Categories for UIFont, UIPageViewController, NSMutableArray
- Loading branch information
1 parent
4148641
commit d622391
Showing
9 changed files
with
160 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// NSMutableArray+MSAddition.h | ||
// MSAddition | ||
// | ||
// Created by Marcin Stepnowski on 24.01.2016. | ||
// Copyright © 2016 siema. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface NSMutableArray (MSAddition) | ||
|
||
- (void)ms_moveObjectFromPosition:(NSUInteger)fromPosition toIndex:(NSUInteger)endPosition; | ||
|
||
@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,20 @@ | ||
// | ||
// NSMutableArray+MSAddition.m | ||
// MSAddition | ||
// | ||
// Created by Marcin Stepnowski on 24.01.2016. | ||
// Copyright © 2016 siema. All rights reserved. | ||
// | ||
|
||
#import "NSMutableArray+MSAddition.h" | ||
|
||
@implementation NSMutableArray (MSAddition) | ||
|
||
- (void)ms_moveObjectFromPosition:(NSUInteger)fromPosition toIndex:(NSUInteger)endPosition | ||
{ | ||
id object = self[fromPosition]; | ||
[self removeObjectAtIndex:fromPosition]; | ||
[self insertObject:object atIndex:endPosition]; | ||
} | ||
|
||
@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,15 @@ | ||
// | ||
// UIFont+MSAddition.h | ||
// MSAddition | ||
// | ||
// Created by Marcin Stepnowski on 24.01.2016. | ||
// Copyright © 2016 siema. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface UIFont (MSAddition) | ||
|
||
+(void)ms_printAllFontNames; | ||
|
||
@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,21 @@ | ||
// | ||
// UIFont+MSAddition.m | ||
// MSAddition | ||
// | ||
// Created by Marcin Stepnowski on 24.01.2016. | ||
// Copyright © 2016 siema. All rights reserved. | ||
// | ||
|
||
#import "UIFont+MSAddition.h" | ||
|
||
@implementation UIFont (MSAddition) | ||
|
||
+(void)ms_printAllFontNames{ | ||
for (NSString *fontFamilyName in [UIFont familyNames]) { | ||
for (NSString *fontName in [UIFont fontNamesForFamilyName:fontFamilyName]) { | ||
NSLog(@"Family: %@ Font: %@", fontFamilyName, fontName); | ||
} | ||
} | ||
} | ||
|
||
@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,15 @@ | ||
// | ||
// UIPageViewController+MSAddition.h | ||
// MSAddition | ||
// | ||
// Created by Marcin Stepnowski on 24.01.2016. | ||
// Copyright © 2016 siema. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface UIPageViewController (MSAddition) | ||
|
||
@property (nonatomic, readonly) UIScrollView* ms_scrollView; | ||
|
||
@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,22 @@ | ||
// | ||
// UIPageViewController+MSAddition.m | ||
// MSAddition | ||
// | ||
// Created by Marcin Stepnowski on 24.01.2016. | ||
// Copyright © 2016 siema. All rights reserved. | ||
// | ||
|
||
#import "UIPageViewController+MSAddition.h" | ||
|
||
@implementation UIPageViewController (MSAddition) | ||
|
||
-(UIScrollView*)ms_scrollView{ | ||
for (UIView *view in self.view.subviews) { | ||
if ([view isKindOfClass:[UIScrollView class]]) { | ||
return (UIScrollView*)view; | ||
} | ||
} | ||
return nil; | ||
} | ||
|
||
@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
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