Skip to content

Commit

Permalink
design updates #6
Browse files Browse the repository at this point in the history
  • Loading branch information
Emre YANIK committed Jun 16, 2016
1 parent 1575f96 commit fb6e062
Show file tree
Hide file tree
Showing 37 changed files with 511 additions and 95 deletions.
41 changes: 32 additions & 9 deletions Muhit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
4B70C8F41B4BE01E009BC526 /* PickFromMapVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4B70C8F21B4BE01E009BC526 /* PickFromMapVC.xib */; };
4B70C8FE1B51A093009BC526 /* NSString+Extended.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B70C8FD1B51A093009BC526 /* NSString+Extended.m */; };
4B7688A71B2B181500B2B6EF /* MTTagLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7688A61B2B181500B2B6EF /* MTTagLabel.m */; };
4B80C41C1D12D53500D39F02 /* IdeasVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B80C41A1D12D53500D39F02 /* IdeasVC.m */; };
4B80C41D1D12D53500D39F02 /* IdeasVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4B80C41B1D12D53500D39F02 /* IdeasVC.xib */; };
4B9F04EF1B1D8A6C009CB713 /* Podfile in Resources */ = {isa = PBXBuildFile; fileRef = 4B9F04EE1B1D8A6C009CB713 /* Podfile */; };
4B9F04F31B1D9415009CB713 /* lang-en.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4B9F04F01B1D9415009CB713 /* lang-en.plist */; };
4B9F04F41B1D9415009CB713 /* lang-tr.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4B9F04F11B1D9415009CB713 /* lang-tr.plist */; };
Expand Down Expand Up @@ -138,6 +140,9 @@
4B70C8FF1B51A0A7009BC526 /* NSString+Extended.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+Extended.h"; sourceTree = "<group>"; };
4B7688A51B2B181500B2B6EF /* MTTagLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTTagLabel.h; sourceTree = "<group>"; };
4B7688A61B2B181500B2B6EF /* MTTagLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTTagLabel.m; sourceTree = "<group>"; };
4B80C4191D12D53500D39F02 /* IdeasVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IdeasVC.h; sourceTree = "<group>"; };
4B80C41A1D12D53500D39F02 /* IdeasVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IdeasVC.m; sourceTree = "<group>"; };
4B80C41B1D12D53500D39F02 /* IdeasVC.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = IdeasVC.xib; sourceTree = "<group>"; };
4B9F04EE1B1D8A6C009CB713 /* Podfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Podfile; path = ../../Podfile; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
4B9F04F01B1D9415009CB713 /* lang-en.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "lang-en.plist"; sourceTree = "<group>"; };
4B9F04F11B1D9415009CB713 /* lang-tr.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "lang-tr.plist"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -339,6 +344,26 @@
path = PickFromMap;
sourceTree = "<group>";
};
4B80C4171D1293BB00D39F02 /* Membering */ = {
isa = PBXGroup;
children = (
4BC9EE931B1EF3F400441353 /* ForgotPassword */,
4B9F05311B1DDA24009CB713 /* Login */,
4BC9EE941B1EF3FB00441353 /* Signup */,
);
path = Membering;
sourceTree = "<group>";
};
4B80C4181D12D4E600D39F02 /* Ideas */ = {
isa = PBXGroup;
children = (
4B80C4191D12D53500D39F02 /* IdeasVC.h */,
4B80C41A1D12D53500D39F02 /* IdeasVC.m */,
4B80C41B1D12D53500D39F02 /* IdeasVC.xib */,
);
path = Ideas;
sourceTree = "<group>";
};
4B9F05121B1D96E1009CB713 /* Root */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -397,8 +422,7 @@
4B9F05331B1DDA42009CB713 /* LoginVC.m */,
4B9F05341B1DDA42009CB713 /* LoginVC.xib */,
);
name = Login;
path = Signup;
path = Login;
sourceTree = "<group>";
};
4B9F05411B1DE5A6009CB713 /* Fonts */ = {
Expand Down Expand Up @@ -508,8 +532,7 @@
4BC9EE9B1B1EF43300441353 /* ForgotPasswordVC.m */,
4BC9EE9C1B1EF43300441353 /* ForgotPasswordVC.xib */,
);
name = ForgotPassword;
path = Login;
path = ForgotPassword;
sourceTree = "<group>";
};
4BC9EE941B1EF3FB00441353 /* Signup */ = {
Expand All @@ -519,8 +542,7 @@
4BC9EE961B1EF41800441353 /* SignupVC.m */,
4BC9EE971B1EF41800441353 /* SignupVC.xib */,
);
name = Signup;
path = ForgotPassword;
path = Signup;
sourceTree = "<group>";
};
4BD0A3B91B2EAF12008ECD02 /* Facebook */ = {
Expand Down Expand Up @@ -573,16 +595,15 @@
4B2169341B218DBF00DEBA01 /* Announcements */,
4BC9BF191D1044B400707A4D /* Commons */,
4B21694E1B21D46300DEBA01 /* EditProfile */,
4BC9EE931B1EF3F400441353 /* ForgotPassword */,
4B21694C1B21D45600DEBA01 /* Headman */,
4B80C4181D12D4E600D39F02 /* Ideas */,
4B21695F1B21D55B00DEBA01 /* Issue */,
4B9F05311B1DDA24009CB713 /* Login */,
4B9F052B1B1DBFAB009CB713 /* Main */,
4B80C4171D1293BB00D39F02 /* Membering */,
4B9F052A1B1DBE1F009CB713 /* Menu */,
4B70C8EF1B4BE001009BC526 /* PickFromMap */,
4B21694D1B21D45D00DEBA01 /* Profile */,
4B9F05121B1D96E1009CB713 /* Root */,
4BC9EE941B1EF3FB00441353 /* Signup */,
4B2169351B218DCD00DEBA01 /* Supporteds */,
4B6FF5A51B3F0CBA00F3ED8A /* TagSelector */,
);
Expand Down Expand Up @@ -733,6 +754,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4B80C41D1D12D53500D39F02 /* IdeasVC.xib in Resources */,
4B2169441B218E6F00DEBA01 /* SupportedsVC.xib in Resources */,
4B70C8F41B4BE01E009BC526 /* PickFromMapVC.xib in Resources */,
4B9F04F31B1D9415009CB713 /* lang-en.plist in Resources */,
Expand Down Expand Up @@ -847,6 +869,7 @@
4B9F04FA1B1D950D009CB713 /* Muhit.m in Sources */,
4B9F05051B1D9524009CB713 /* UIView+CustomNib.m in Sources */,
4BF7F9061B1CF39D00A35FD1 /* ServiceHandler.m in Sources */,
4B80C41C1D12D53500D39F02 /* IdeasVC.m in Sources */,
4B2169691B21D5B500DEBA01 /* IssueVC.m in Sources */,
4B21696E1B21D5C500DEBA01 /* SearchVC.m in Sources */,
4B9F05161B1DBD04009CB713 /* NavBar.m in Sources */,
Expand Down
2 changes: 2 additions & 0 deletions Muhit/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#import <Fabric/Fabric.h>
#import <Crashlytics/Crashlytics.h>
#import "FacebookManager.h"
#import "MMDrawerVisualState.h"

#define ALERT_PUSH_NOTIFICATION 10

Expand Down Expand Up @@ -132,6 +133,7 @@ -(void)initNavigationBar{
[MT setDrawerController:[[MMDrawerController alloc] initWithCenterViewController: [MT navCon]
leftDrawerViewController: [[MenuVC alloc] init]]];

[[MT drawerController] setDrawerVisualStateBlock:[MMDrawerVisualState parallaxVisualStateBlockWithParallaxFactor:2.0]];
[[MT drawerController] setMaximumLeftDrawerWidth:240.0];
[[MT drawerController] setOpenDrawerGestureModeMask:MMOpenDrawerGestureModeAll];
[[MT drawerController] setCloseDrawerGestureModeMask:MMCloseDrawerGestureModeAll];
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "muhit-tea-glass.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Muhit/Classes/NavBar.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ - (id)initWithFrame:(CGRect)frame
[self setBarTintColor:CLR_LIGHT_BLUE];
[[UINavigationBar appearance] setTitleTextAttributes: @{
NSForegroundColorAttributeName:[UIColor whiteColor],
NSFontAttributeName: [UIFont fontWithName:@"SourceSansPro-Semibold" size:19.0f]
NSFontAttributeName: [UIFont fontWithName:FONT_SEMI_BOLD size:20.0f]
}];
[self setTintColor:[UIColor whiteColor]];
[self setTintAdjustmentMode:UIViewTintAdjustmentModeAutomatic];
Expand Down
8 changes: 4 additions & 4 deletions Muhit/Classes/ScreenOperations.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
+ (void)openCreateIssue;
+ (void)openEditIssueWithInfo:(NSDictionary *)info;
+ (void)openMain;
+ (void)openSupports;
+ (void)openIdeas;
+ (void)openAnnouncements;
+ (void)openHeadman;
+ (void)openSupporteds:(BOOL)fromMenu;
+ (void)openHeadman:(BOOL)fromMenu;
+ (void)openIdeas:(BOOL)fromMenu;
+ (void)openAnnouncements:(BOOL)fromMenu;
+ (void)openPickFromMap;

@end
64 changes: 53 additions & 11 deletions Muhit/Classes/ScreenOperations.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
#import "IssueVC.h"
#import "AddEditIssueVC.h"
#import "PickFromMapVC.h"
#import "MainVC.h"
#import "IdeasVC.h"
#import "NavBar.h"

@implementation ScreenOperations

Expand Down Expand Up @@ -68,30 +71,69 @@ + (void)openEditIssueWithInfo:(NSDictionary *)info{
}

+ (void)openMain{
[[MT navCon] popToRootViewControllerAnimated:YES];
MainVC *vc = [[MainVC alloc] init];
[self setCenterVC:vc];
}

+ (void)openSupports{
SupportedsVC *vc = [[SupportedsVC alloc] init];
[[MT navCon] pushViewController:vc animated:YES];
+ (void)openSupporteds:(BOOL)fromMenu{
if(fromMenu){
SupportedsVC *vc = [[SupportedsVC alloc] initFromMenu];
[self setCenterVC:vc];
}
else{
SupportedsVC *vc = [[SupportedsVC alloc] init];
[[MT navCon] pushViewController:vc animated:YES];
}
}

+ (void)openIdeas{
+ (void)openIdeas:(BOOL)fromMenu{
if(fromMenu){
IdeasVC *vc = [[IdeasVC alloc] initFromMenu];
[self setCenterVC:vc];
}
else{
IdeasVC *vc = [[IdeasVC alloc] init];
[[MT navCon] pushViewController:vc animated:YES];
}
}

+ (void)openAnnouncements{
AnnouncementsVC *vc = [[AnnouncementsVC alloc] init];
[[MT navCon] pushViewController:vc animated:YES];
+ (void)openAnnouncements:(BOOL)fromMenu{
if(fromMenu){
AnnouncementsVC *vc = [[AnnouncementsVC alloc] initFromMenu];
[self setCenterVC:vc];
}
else{
AnnouncementsVC *vc = [[AnnouncementsVC alloc] init];
[[MT navCon] pushViewController:vc animated:YES];
}
}

+ (void)openHeadman{
HeadmanVC *vc = [[HeadmanVC alloc] init];
[[MT navCon] pushViewController:vc animated:YES];
+ (void)openHeadman:(BOOL)fromMenu{
if(fromMenu){
HeadmanVC *vc = [[HeadmanVC alloc] initFromMenu];
[self setCenterVC:vc];
}
else{
HeadmanVC *vc = [[HeadmanVC alloc] init];
[[MT navCon] pushViewController:vc animated:YES];
}
}

+ (void)openPickFromMap{
PickFromMapVC * vc = [[PickFromMapVC alloc] init];
[[MT navCon] presentViewController:vc animated:YES completion:nil];
}

+ (void)setCenterVC:(UIViewController*)vc{
UINavigationController *navCon = [[UINavigationController alloc] initWithNavigationBarClass:[NavBar class] toolbarClass:nil];
[navCon pushViewController:vc animated:NO];
[navCon setNavigationBarHidden:NO];
[MT setNavCon:navCon];
[[MT drawerController] setCenterViewController:navCon withCloseAnimation:YES completion:^(BOOL finished) {
if (finished) {
[[MT drawerController] setOpenDrawerGestureModeMask:MMOpenDrawerGestureModeAll];
}
}];
}

@end
1 change: 1 addition & 0 deletions Muhit/Classes/UtilityFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,5 @@ typedef enum{
+(NSString*)getHoodFromAddress:(NSString *)address;

+(CGSize)screenSize;
+(UIView*)titleViewWithTitle:(NSString*)title;
@end
20 changes: 20 additions & 0 deletions Muhit/Classes/UtilityFunctions.m
Original file line number Diff line number Diff line change
Expand Up @@ -945,4 +945,24 @@ +(CGSize)screenSize{
return CGSizeMake(screenWidth, screenHeight);
}

+(UIView*)titleViewWithTitle:(NSString*)title{

UIImageView *img = [[UIImageView alloc] initWithFrame:CGRectMake(0, 2, 17, 18)];
[img setImage:[UIImage imageNamed:@"muhit-tea-glass"]];

UILabel *lblTitle = [[UILabel alloc] init];
[lblTitle setFont:[UIFont fontWithName:FONT_SEMI_BOLD size:20]];
[lblTitle setTextAlignment:NSTextAlignmentLeft];
[lblTitle setTextColor:CLR_WHITE];
[lblTitle setText:title];

CGSize textSize = [[lblTitle text] sizeWithAttributes:@{NSFontAttributeName:[lblTitle font]}];
[lblTitle setFrame:CGRectMake(22, 0, textSize.width+2, 22)];

UIView *titleView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, img.width+lblTitle.width, 22)];
[titleView addSubview:img];
[titleView addSubview:lblTitle];
return titleView;
}

@end
33 changes: 7 additions & 26 deletions Muhit/ViewControllers/AddEditIssue/AddEditIssueVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ @interface AddEditIssueVC (){
IBOutlet UITextView *txtProblem,*txtSolution;
IBOutlet UIView *viewHood,*viewProblem,*viewSolution,*viewTags,*viewPhotos,*viewAddTag,*viewAnonim;
IBOutlet UIButton *btnSave,*btnAnonim,*btnAddTag,*btnAddPhoto,*btnHood;
IBOutlet UIImageView *imgDownIconHood,*imgAnonim,*imgLocation,*imgAnonimTick,*imgLocationTick,*imgAddTag;
IBOutlet NSLayoutConstraint *constPhotosViewWidth,*constBtnAddImageLeft,*constTagsViewHeight,*constBtnAddTagLeft,*constBtnAddTagTop,*constContainerHeight;
IBOutlet UIImageView *imgDownIconHood,*imgAddTag;
IBOutlet NSLayoutConstraint *constBtnAddImageTop,*constTagsViewHeight,*constBtnAddTagLeft,*constBtnAddTagTop,*constContainerHeight;
BOOL isAnonim,displayOnce;
float totalPhotosWidth,totalTagsWidth,lastTagsY;
UIActionSheet *actionSheet;
Expand Down Expand Up @@ -98,20 +98,9 @@ -(void)adjustUI{
btnAddPhoto.layer.cornerRadius = cornerRadius;
viewAddTag.layer.cornerRadius = cornerRadius;

imgAnonimTick.layer.cornerRadius = cornerRadius;
imgAnonimTick.layer.masksToBounds = YES;

imgLocationTick.layer.cornerRadius = cornerRadius;
imgLocationTick.layer.masksToBounds = YES;

[imgDownIconHood setImage:[IonIcons imageWithIcon:ion_android_locate size:20 color:CLR_LIGHT_BLUE]];
[imgAnonim setImage:[IonIcons imageWithIcon:ion_eye_disabled size:26 color:CLR_LIGHT_BLUE]];
[imgLocation setImage:[IonIcons imageWithIcon:ion_location size:26 color:CLR_LIGHT_BLUE]];
[btnAddPhoto setImage:[IonIcons imageWithIcon:ion_plus size:26 color:[UIColor whiteColor]]];
[imgAddTag setImage:[IonIcons imageWithIcon:ion_plus size:15 color:[UIColor whiteColor]]];

[imgAnonimTick setImage:[IonIcons imageWithIcon:ion_checkmark size:20 color:[UIColor whiteColor]]];
[imgLocationTick setImage:[IonIcons imageWithIcon:ion_checkmark size:20 color:[UIColor whiteColor]]];
[imgDownIconHood setImage:[IonIcons imageWithIcon:ion_chevron_down size:18 color:[HXColor hx_colorWithHexRGBAString:@"9999AA"]]];
[btnAddPhoto setImage:[IonIcons imageWithIcon:ion_camera size:16 color:CLR_WHITE]];
[imgAddTag setImage:[IonIcons imageWithIcon:ion_chevron_down size:18 color:[HXColor hx_colorWithHexRGBAString:@"9999AA"]]];
}

-(void)setForEdit{
Expand Down Expand Up @@ -198,12 +187,6 @@ -(IBAction)actAddTag:(id)sender{
}

-(IBAction)actAnonim:(id)sender{
if (isAnonim) {
[imgAnonimTick setBackgroundColor:[UIColor whiteColor]];
}
else{
[imgAnonimTick setBackgroundColor:CLR_LIGHT_BLUE];
}
isAnonim = !isAnonim;
}

Expand Down Expand Up @@ -339,8 +322,7 @@ -(void)refreshPhotosView{
}

if ([arrPhotos count] == 0) {
constPhotosViewWidth.constant = 0;
constBtnAddImageLeft.constant = 0;
constBtnAddImageTop.constant = 5;
}
else{
totalPhotosWidth = 0;
Expand All @@ -360,8 +342,7 @@ -(void)refreshPhotosView{
[viewPhotos addSubview:imgView];
[viewPhotos addSubview:btn];
totalPhotosWidth+= 55;
constPhotosViewWidth.constant = totalPhotosWidth-10;
constBtnAddImageLeft.constant = 10;
constBtnAddImageTop.constant = 70;
[self.view layoutIfNeeded];
}
}
Expand Down
Loading

0 comments on commit fb6e062

Please sign in to comment.