Release 0.1.1

This commit is contained in:
giuseppenuc committed 2015-07-16 14:18:12 +02:00
1 parent 901e013182
commit 6fe5a9839c
125 files changed
+1879 -2821

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@
#import <Foundation/Foundation.h>
#import "TabBarSubItem.h"
@interface TabBarItem : NSObject
@interface TabBarItem : UIView
/**
* Represents the image visible in picker when item is not selected.
+2 -2
View File
@@ -7,12 +7,12 @@
//
#import "TabBarItem.h"
#import <PureLayout/PureLayout.h>
@implementation TabBarItem
- (instancetype) initWithSubItems:(NSArray*) array {
self = [super init];
self = [self initForAutoLayout];
if (self) {
NSAssert(array, @"SubItemsArray cannot be nil");
+31 -5
View File
@@ -21,21 +21,47 @@ typedef enum
@interface TabBarPicker : UIView
@property (nonatomic, strong) NSMutableArray *tabBarItems;
@property (nonatomic) CGFloat maxHeight;
@property (nonatomic) CGFloat maxWidth;
@property (nonatomic, readonly) CGSize tabBarSize;
@property (nonatomic) TabBarPickerPosition position;
+ (NSString*) tabBarVersion;
/**
* Init TabBarPicker with items. When is selected an item the picher show down subitems.
* By default when one of more subItems are selected the selected item become selected.
* By default the tabBar size is max screen width and 100px height
* The picker size is dinamically based the max subitems of items.
*
* @param items Represents tab bar items. That array cannot be nil.
*
* @param position Represents the posizion in the Screen:
* - TabBarPickerPositionLeft : Is positioned in vertical on left of the screen and shows the picker at its right
* - TabBarPickerPositionRight : Is positioned in vertical on right of the screen and shows the picker at its left
* - TabBarPickerPositionBottom : Is positioned in horizontal on bottom of the screen and shows the picker at its top
* - TabBarPickerPositionTop : Is positioned in horizontal on top of the screen and shows the picker at its bottom
*
* @return raturn instance of TabBarPicker object.
*/
- (instancetype) initWithTabBarItems:(NSArray*) items withSize:(CGSize) size forPosition:(TabBarPickerPosition) position;
- (instancetype) initWithTabBarItems:(NSArray *)items forPosition:(TabBarPickerPosition)position;
/**
* Init TabBarPicker with items. When is selected an item the picher show down subitems.
* By default when one of more subItems are selected the selected item become selected.
* The picker size is dinamically based the max subitems of items
*
* @param items Represents tab bar items. That array cannot be nil.
*
* @param size Represents the tabbar size
*
* @param position Represents the posizion in the Screen:
* - TabBarPickerPositionLeft : Is positioned in vertical on left of the screen and shows the picker at its right
* - TabBarPickerPositionRight : Is positioned in vertical on right of the screen and shows the picker at its left
* - TabBarPickerPositionBottom : Is positioned in horizontal on bottom of the screen and shows the picker at its top
* - TabBarPickerPositionTop : Is positioned in horizontal on top of the screen and shows the picker at its bottom
*
* @return raturn instance of TabBarPicker object.
*/
- (instancetype) initWithTabBarItems:(NSArray*) items withTabBarSize:(CGSize) size forPosition:(TabBarPickerPosition) position;
@end
+43 -2
View File
@@ -7,16 +7,42 @@
//
#import "TabBarPicker.h"
#import <PureLayout/PureLayout.h>
#define tabBarSizeVertical CGSizeMake()
@interface TabBarPicker(){
}
@end
@implementation TabBarPicker
- (instancetype) initWithTabBarItems:(NSArray*) items withSize:(CGSize) size forPosition:(TabBarPickerPosition) position {
+ (NSString*) tabBarVersion {
return @"1";
}
- (instancetype) initWithTabBarItems:(NSArray *)items forPosition:(TabBarPickerPosition)position {
NSLog(@"init");
return [self initWithTabBarItems:items withTabBarSize:CGSizeZero forPosition:position];
self = [super init];
}
- (instancetype) initWithTabBarItems:(NSArray*) items withTabBarSize:(CGSize) size forPosition:(TabBarPickerPosition) position {
self = [self initForAutoLayout];
if (self) {
NSAssert(items, @"TabBar Items array cannot be nil!");
if (CGSizeEqualToSize(size, CGSizeZero)) {
_tabBarSize = CGSizeMake([[UIScreen mainScreen] bounds].size.width, 100);
}
_tabBarItems = [[NSMutableArray alloc] init];
for (NSObject *item in items) {
@@ -25,7 +51,22 @@
}
}
}
NSLog(@"prova");
[self autoSetDimension:ALDimensionWidth toSize:[[UIScreen mainScreen] bounds].size.width relation:NSLayoutRelationLessThanOrEqual];
[self autoSetDimension:ALDimensionHeight toSize:_tabBarSize.height relation:NSLayoutRelationLessThanOrEqual];
for (TabBarItem *item in _tabBarItems) {
}
return self;
}
- (void) layoutSubviews {
}
@end
+2 -1
View File
@@ -7,8 +7,9 @@
//
#import <Foundation/Foundation.h>
//#import "PureLayout.h"
@interface TabBarSubItem : NSObject
@interface TabBarSubItem : UIView
@property (nonatomic, strong) NSString *name;
+2 -2
View File
@@ -7,14 +7,14 @@
//
#import "TabBarSubItem.h"
#import <PureLayout/PureLayout.h>
@implementation TabBarSubItem
- (instancetype) initWithName:(NSString *) name {
self = [super init];
self = [self initForAutoLayout];
if (self) {
_name = name;
}