diff --git a/Muhit.xcodeproj/project.pbxproj b/Muhit.xcodeproj/project.pbxproj index 68ba614..95b5a8c 100755 --- a/Muhit.xcodeproj/project.pbxproj +++ b/Muhit.xcodeproj/project.pbxproj @@ -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 */; }; @@ -138,6 +140,9 @@ 4B70C8FF1B51A0A7009BC526 /* NSString+Extended.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+Extended.h"; sourceTree = ""; }; 4B7688A51B2B181500B2B6EF /* MTTagLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTTagLabel.h; sourceTree = ""; }; 4B7688A61B2B181500B2B6EF /* MTTagLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTTagLabel.m; sourceTree = ""; }; + 4B80C4191D12D53500D39F02 /* IdeasVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IdeasVC.h; sourceTree = ""; }; + 4B80C41A1D12D53500D39F02 /* IdeasVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IdeasVC.m; sourceTree = ""; }; + 4B80C41B1D12D53500D39F02 /* IdeasVC.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = IdeasVC.xib; sourceTree = ""; }; 4B9F04EE1B1D8A6C009CB713 /* Podfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Podfile; path = ../../Podfile; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 4B9F04F01B1D9415009CB713 /* lang-en.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "lang-en.plist"; sourceTree = ""; }; 4B9F04F11B1D9415009CB713 /* lang-tr.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "lang-tr.plist"; sourceTree = ""; }; @@ -339,6 +344,26 @@ path = PickFromMap; sourceTree = ""; }; + 4B80C4171D1293BB00D39F02 /* Membering */ = { + isa = PBXGroup; + children = ( + 4BC9EE931B1EF3F400441353 /* ForgotPassword */, + 4B9F05311B1DDA24009CB713 /* Login */, + 4BC9EE941B1EF3FB00441353 /* Signup */, + ); + path = Membering; + sourceTree = ""; + }; + 4B80C4181D12D4E600D39F02 /* Ideas */ = { + isa = PBXGroup; + children = ( + 4B80C4191D12D53500D39F02 /* IdeasVC.h */, + 4B80C41A1D12D53500D39F02 /* IdeasVC.m */, + 4B80C41B1D12D53500D39F02 /* IdeasVC.xib */, + ); + path = Ideas; + sourceTree = ""; + }; 4B9F05121B1D96E1009CB713 /* Root */ = { isa = PBXGroup; children = ( @@ -397,8 +422,7 @@ 4B9F05331B1DDA42009CB713 /* LoginVC.m */, 4B9F05341B1DDA42009CB713 /* LoginVC.xib */, ); - name = Login; - path = Signup; + path = Login; sourceTree = ""; }; 4B9F05411B1DE5A6009CB713 /* Fonts */ = { @@ -508,8 +532,7 @@ 4BC9EE9B1B1EF43300441353 /* ForgotPasswordVC.m */, 4BC9EE9C1B1EF43300441353 /* ForgotPasswordVC.xib */, ); - name = ForgotPassword; - path = Login; + path = ForgotPassword; sourceTree = ""; }; 4BC9EE941B1EF3FB00441353 /* Signup */ = { @@ -519,8 +542,7 @@ 4BC9EE961B1EF41800441353 /* SignupVC.m */, 4BC9EE971B1EF41800441353 /* SignupVC.xib */, ); - name = Signup; - path = ForgotPassword; + path = Signup; sourceTree = ""; }; 4BD0A3B91B2EAF12008ECD02 /* Facebook */ = { @@ -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 */, ); @@ -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 */, @@ -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 */, diff --git a/Muhit/AppDelegate.m b/Muhit/AppDelegate.m index 3c482d4..ca1adf3 100755 --- a/Muhit/AppDelegate.m +++ b/Muhit/AppDelegate.m @@ -12,6 +12,7 @@ #import #import #import "FacebookManager.h" +#import "MMDrawerVisualState.h" #define ALERT_PUSH_NOTIFICATION 10 @@ -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]; diff --git a/Muhit/Assets/Images.xcassets/muhit-tea-glass.imageset/Contents.json b/Muhit/Assets/Images.xcassets/muhit-tea-glass.imageset/Contents.json new file mode 100644 index 0000000..87c0581 --- /dev/null +++ b/Muhit/Assets/Images.xcassets/muhit-tea-glass.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "muhit-tea-glass.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "muhit-tea-glass@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "muhit-tea-glass@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Muhit/Assets/Images.xcassets/muhit-tea-glass.imageset/muhit-tea-glass.png b/Muhit/Assets/Images.xcassets/muhit-tea-glass.imageset/muhit-tea-glass.png new file mode 100644 index 0000000..b8c8238 Binary files /dev/null and b/Muhit/Assets/Images.xcassets/muhit-tea-glass.imageset/muhit-tea-glass.png differ diff --git a/Muhit/Assets/Images.xcassets/muhit-tea-glass.imageset/muhit-tea-glass@2x.png b/Muhit/Assets/Images.xcassets/muhit-tea-glass.imageset/muhit-tea-glass@2x.png new file mode 100644 index 0000000..91231a7 Binary files /dev/null and b/Muhit/Assets/Images.xcassets/muhit-tea-glass.imageset/muhit-tea-glass@2x.png differ diff --git a/Muhit/Assets/Images.xcassets/muhit-tea-glass.imageset/muhit-tea-glass@3x.png b/Muhit/Assets/Images.xcassets/muhit-tea-glass.imageset/muhit-tea-glass@3x.png new file mode 100644 index 0000000..1616a6f Binary files /dev/null and b/Muhit/Assets/Images.xcassets/muhit-tea-glass.imageset/muhit-tea-glass@3x.png differ diff --git a/Muhit/Classes/NavBar.m b/Muhit/Classes/NavBar.m index 31cc663..cbb8d6b 100755 --- a/Muhit/Classes/NavBar.m +++ b/Muhit/Classes/NavBar.m @@ -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]; diff --git a/Muhit/Classes/ScreenOperations.h b/Muhit/Classes/ScreenOperations.h index a3636e1..eab94ed 100755 --- a/Muhit/Classes/ScreenOperations.h +++ b/Muhit/Classes/ScreenOperations.h @@ -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 diff --git a/Muhit/Classes/ScreenOperations.m b/Muhit/Classes/ScreenOperations.m index 06a882c..aaa2cef 100755 --- a/Muhit/Classes/ScreenOperations.m +++ b/Muhit/Classes/ScreenOperations.m @@ -19,6 +19,9 @@ #import "IssueVC.h" #import "AddEditIssueVC.h" #import "PickFromMapVC.h" +#import "MainVC.h" +#import "IdeasVC.h" +#import "NavBar.h" @implementation ScreenOperations @@ -68,25 +71,52 @@ + (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{ @@ -94,4 +124,16 @@ + (void)openPickFromMap{ [[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 \ No newline at end of file diff --git a/Muhit/Classes/UtilityFunctions.h b/Muhit/Classes/UtilityFunctions.h index c3c3a90..8352f26 100755 --- a/Muhit/Classes/UtilityFunctions.h +++ b/Muhit/Classes/UtilityFunctions.h @@ -103,4 +103,5 @@ typedef enum{ +(NSString*)getHoodFromAddress:(NSString *)address; +(CGSize)screenSize; ++(UIView*)titleViewWithTitle:(NSString*)title; @end diff --git a/Muhit/Classes/UtilityFunctions.m b/Muhit/Classes/UtilityFunctions.m index a67bec0..3bdea71 100755 --- a/Muhit/Classes/UtilityFunctions.m +++ b/Muhit/Classes/UtilityFunctions.m @@ -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 diff --git a/Muhit/ViewControllers/AddEditIssue/AddEditIssueVC.m b/Muhit/ViewControllers/AddEditIssue/AddEditIssueVC.m index dad6251..c7b7d1e 100755 --- a/Muhit/ViewControllers/AddEditIssue/AddEditIssueVC.m +++ b/Muhit/ViewControllers/AddEditIssue/AddEditIssueVC.m @@ -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; @@ -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{ @@ -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; } @@ -339,8 +322,7 @@ -(void)refreshPhotosView{ } if ([arrPhotos count] == 0) { - constPhotosViewWidth.constant = 0; - constBtnAddImageLeft.constant = 0; + constBtnAddImageTop.constant = 5; } else{ totalPhotosWidth = 0; @@ -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]; } } diff --git a/Muhit/ViewControllers/AddEditIssue/AddEditIssueVC.xib b/Muhit/ViewControllers/AddEditIssue/AddEditIssueVC.xib index d055a62..e5ea26e 100755 --- a/Muhit/ViewControllers/AddEditIssue/AddEditIssueVC.xib +++ b/Muhit/ViewControllers/AddEditIssue/AddEditIssueVC.xib @@ -7,7 +7,6 @@ SourceSansPro-Bold - SourceSansPro-Bold SourceSansPro-Regular @@ -20,10 +19,12 @@ SourceSansPro-Regular SourceSansPro-Regular SourceSansPro-Regular + SourceSansPro-Regular SourceSansPro-Semibold SourceSansPro-Semibold + SourceSansPro-Semibold @@ -34,14 +35,14 @@ - + - + - + @@ -67,8 +68,8 @@ - - + + @@ -213,23 +214,23 @@ - + - - + @@ -253,7 +254,7 @@ - + @@ -266,22 +267,24 @@ - - + + - - + - + + + diff --git a/Muhit/ViewControllers/Headman/HeadmanVC.h b/Muhit/ViewControllers/Headman/HeadmanVC.h index f8acdee..2da6217 100755 --- a/Muhit/ViewControllers/Headman/HeadmanVC.h +++ b/Muhit/ViewControllers/Headman/HeadmanVC.h @@ -8,4 +8,6 @@ @interface HeadmanVC : RootVC +- (id)initFromMenu; + @end diff --git a/Muhit/ViewControllers/Headman/HeadmanVC.m b/Muhit/ViewControllers/Headman/HeadmanVC.m index 13ede42..aee1413 100755 --- a/Muhit/ViewControllers/Headman/HeadmanVC.m +++ b/Muhit/ViewControllers/Headman/HeadmanVC.m @@ -13,18 +13,38 @@ @interface HeadmanVC (){ IBOutlet UILabel *lblHood,*lblName,*lblCity,*lblPhone,*lblCell,*lblMail,*lblAddress; IBOutlet UIImageView *imgHeadman,*imgPhone,*imgCell,*imgMail,*imgAddress; IBOutlet UIView *viewPhone,*viewCell,*viewMail,*viewAddress; + IBOutlet UIButton *btnMenu; IBOutlet GMSMapView *map; CLLocationManager *locationManager; CLLocationCoordinate2D coordHeadman,coordUser; IBOutlet NSLayoutConstraint *constPhoneTop,*constCellTop,*constMailTop,*constAddressTop,*constMapTop; + BOOL fromMenu; } - @end @implementation HeadmanVC +- (id)initFromMenu{ + self = [super init]; + if (self){ + fromMenu = YES; + } + return self; +} + + - (void)viewDidLoad { [super viewDidLoad]; + + if (fromMenu) { + [btnMenu setSize:CGSizeMake(40, 36)]; + [btnMenu setImage:[IonIcons imageWithIcon:ion_navicon size:36 color:CLR_WHITE]]; + UIBarButtonItem *barBtnMenu = [[UIBarButtonItem alloc] initWithCustomView:btnMenu]; + UIBarButtonItem *negativeSpacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemFixedSpace target:nil action:nil]; + negativeSpacer.width = -12; + [[self navigationItem] setLeftBarButtonItems:[NSArray arrayWithObjects:negativeSpacer, barBtnMenu, nil] animated:NO]; + } + [self adjustUI]; [self test]; } @@ -50,6 +70,11 @@ -(void)adjustUI{ } } +-(IBAction)actMenu:(id)sender{ + [self.view endEditing:YES]; + [[MT drawerController] toggleDrawerSide:MMDrawerSideLeft animated:YES completion:nil]; +} + -(void)test{ NSDictionary *dict =@{ @"name":@"Kamil Can", @@ -140,7 +165,7 @@ - (void)didReceiveMemoryWarning { } - (void)setLocalizedStrings{ - [self setTitle:LocalizedString(@"my-headman")]; + [[self navigationItem] setTitleView:[UF titleViewWithTitle:LocalizedString(@"my-headman")]]; } @end diff --git a/Muhit/ViewControllers/Headman/HeadmanVC.xib b/Muhit/ViewControllers/Headman/HeadmanVC.xib index 8aa3569..91d4165 100755 --- a/Muhit/ViewControllers/Headman/HeadmanVC.xib +++ b/Muhit/ViewControllers/Headman/HeadmanVC.xib @@ -20,6 +20,7 @@ + @@ -295,9 +296,22 @@ + + diff --git a/Muhit/ViewControllers/Ideas/IdeasVC.h b/Muhit/ViewControllers/Ideas/IdeasVC.h new file mode 100644 index 0000000..25ab4ba --- /dev/null +++ b/Muhit/ViewControllers/Ideas/IdeasVC.h @@ -0,0 +1,15 @@ +// +// IdeasVC.h +// Muhit +// +// Created by Emre YANIK on 16/06/16. +// Copyright © 2016 Muhit. All rights reserved. +// + +#import + +@interface IdeasVC : RootVC + +- (id)initFromMenu; + +@end diff --git a/Muhit/ViewControllers/Ideas/IdeasVC.m b/Muhit/ViewControllers/Ideas/IdeasVC.m new file mode 100644 index 0000000..e49c0f7 --- /dev/null +++ b/Muhit/ViewControllers/Ideas/IdeasVC.m @@ -0,0 +1,127 @@ +// +// IdeasVC.m +// Muhit +// +// Created by Emre YANIK on 16/06/16. +// Copyright © 2016 Muhit. All rights reserved. +// + +#import "IdeasVC.h" +#import "IssueCell.h" + +@interface IdeasVC (){ + IBOutlet UITableView *tblIdeas; + IBOutlet UIButton *btnMenu;; + NSArray *arrIdeas; + BOOL fromMenu; +} +@end + +@implementation IdeasVC + +- (id)initFromMenu{ + self = [super init]; + if (self){ + fromMenu = YES; + } + return self; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + + if (fromMenu) { + [btnMenu setSize:CGSizeMake(40, 36)]; + [btnMenu setImage:[IonIcons imageWithIcon:ion_navicon size:36 color:CLR_WHITE]]; + UIBarButtonItem *barBtnMenu = [[UIBarButtonItem alloc] initWithCustomView:btnMenu]; + UIBarButtonItem *negativeSpacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemFixedSpace target:nil action:nil]; + negativeSpacer.width = -12; + [[self navigationItem] setLeftBarButtonItems:[NSArray arrayWithObjects:negativeSpacer, barBtnMenu, nil] animated:NO]; + } + [self test]; +} + +-(void)test{ + arrIdeas = @[ + @{ + @"title":@"Lorem ipsum dolor sit amet, consectetur adipiscing", + @"date":@"10.11.2015", + @"imageUrl":@"http://cdn.gottabemobile.com/wp-content/uploads/2012/02/nikon-d800-sample-library-photo-620x413.jpg" + }, + @{ + @"title":@"Lorem ipsum dolor sit amet, consectetur adipiscing", + @"date":@"12.11.2015", + @"imageUrl":@"http://farm5.staticflickr.com/4044/5163861339_10d4ba7d4d_z.jpg" + }, + + @{ + @"title":@"Lorem ipsum dolor sit amet, consectetur adipiscing", + @"date":@"08.11.2015", + @"imageUrl":@"http://www.canon.com.tr/Images/PowerShot%20G1%20X%20Mark%20II%20sample%20Z2%20med_tcm123-1139968.jpg" + }]; + + [tblIdeas reloadData]; +} + + +-(IBAction)actMenu:(id)sender{ + [self.view endEditing:YES]; + [[MT drawerController] toggleDrawerSide:MMDrawerSideLeft animated:YES completion:nil]; +} + +-(IBAction)actCreateIssue:(id)sender{ + if ([MT isLoggedIn]) { + [ScreenOperations openCreateIssue]; + } + else{ + [ScreenOperations openLogin]; + } +} + +#pragma mark - UITableView Delegates + +-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + return 80; +} + + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ + return [arrIdeas count]; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ + + NSDictionary *item = [arrIdeas objectAtIndex:indexPath.row]; + + IssueCell *cell = [tableView dequeueReusableCellWithIdentifier:@"IssueCell"]; + + if (!cell) { + cell = [[IssueCell alloc] init]; + } + + [cell setWithDictionary:item]; + cell.selectionStyle = UITableViewCellSelectionStyleNone; + + return cell; +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + + NSDictionary *item = [arrIdeas objectAtIndex:indexPath.row]; + [ScreenOperations openIssueWitDetail:item]; +} + +- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath{ + return NO; +} +#pragma mark - + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; +} + +- (void)setLocalizedStrings{ + [[self navigationItem] setTitleView:[UF titleViewWithTitle:LocalizedString(@"my-ideas")]]; +} + +@end diff --git a/Muhit/ViewControllers/Ideas/IdeasVC.xib b/Muhit/ViewControllers/Ideas/IdeasVC.xib new file mode 100644 index 0000000..fedc779 --- /dev/null +++ b/Muhit/ViewControllers/Ideas/IdeasVC.xib @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Muhit/ViewControllers/Login/ForgotPasswordVC.h b/Muhit/ViewControllers/Membering/ForgotPassword/ForgotPasswordVC.h similarity index 100% rename from Muhit/ViewControllers/Login/ForgotPasswordVC.h rename to Muhit/ViewControllers/Membering/ForgotPassword/ForgotPasswordVC.h diff --git a/Muhit/ViewControllers/Login/ForgotPasswordVC.m b/Muhit/ViewControllers/Membering/ForgotPassword/ForgotPasswordVC.m similarity index 100% rename from Muhit/ViewControllers/Login/ForgotPasswordVC.m rename to Muhit/ViewControllers/Membering/ForgotPassword/ForgotPasswordVC.m diff --git a/Muhit/ViewControllers/Login/ForgotPasswordVC.xib b/Muhit/ViewControllers/Membering/ForgotPassword/ForgotPasswordVC.xib similarity index 100% rename from Muhit/ViewControllers/Login/ForgotPasswordVC.xib rename to Muhit/ViewControllers/Membering/ForgotPassword/ForgotPasswordVC.xib diff --git a/Muhit/ViewControllers/Signup/LoginVC.h b/Muhit/ViewControllers/Membering/Login/LoginVC.h similarity index 100% rename from Muhit/ViewControllers/Signup/LoginVC.h rename to Muhit/ViewControllers/Membering/Login/LoginVC.h diff --git a/Muhit/ViewControllers/Signup/LoginVC.m b/Muhit/ViewControllers/Membering/Login/LoginVC.m similarity index 100% rename from Muhit/ViewControllers/Signup/LoginVC.m rename to Muhit/ViewControllers/Membering/Login/LoginVC.m diff --git a/Muhit/ViewControllers/Signup/LoginVC.xib b/Muhit/ViewControllers/Membering/Login/LoginVC.xib similarity index 100% rename from Muhit/ViewControllers/Signup/LoginVC.xib rename to Muhit/ViewControllers/Membering/Login/LoginVC.xib diff --git a/Muhit/ViewControllers/ForgotPassword/SignupVC.h b/Muhit/ViewControllers/Membering/Signup/SignupVC.h similarity index 100% rename from Muhit/ViewControllers/ForgotPassword/SignupVC.h rename to Muhit/ViewControllers/Membering/Signup/SignupVC.h diff --git a/Muhit/ViewControllers/ForgotPassword/SignupVC.m b/Muhit/ViewControllers/Membering/Signup/SignupVC.m similarity index 100% rename from Muhit/ViewControllers/ForgotPassword/SignupVC.m rename to Muhit/ViewControllers/Membering/Signup/SignupVC.m diff --git a/Muhit/ViewControllers/ForgotPassword/SignupVC.xib b/Muhit/ViewControllers/Membering/Signup/SignupVC.xib similarity index 100% rename from Muhit/ViewControllers/ForgotPassword/SignupVC.xib rename to Muhit/ViewControllers/Membering/Signup/SignupVC.xib diff --git a/Muhit/ViewControllers/Menu/MenuVC.h b/Muhit/ViewControllers/Menu/MenuVC.h index 66f4644..cd8fc11 100755 --- a/Muhit/ViewControllers/Menu/MenuVC.h +++ b/Muhit/ViewControllers/Menu/MenuVC.h @@ -11,7 +11,7 @@ #define MENU_ITEM_SELECTED @"MenuItemSelected" #define SELECTOR_MAIN @"openMain:" -#define SELECTOR_SUPPORTS @"openSupports:" +#define SELECTOR_SUPPORTS @"openSupporteds:" #define SELECTOR_IDEAS @"openIdeas:" #define SELECTOR_NOTIFICATIONS @"openAnnouncements:" #define SELECTOR_HEADMAN @"openHeadman:" diff --git a/Muhit/ViewControllers/Menu/MenuVC.m b/Muhit/ViewControllers/Menu/MenuVC.m index e8d0acc..96b803e 100755 --- a/Muhit/ViewControllers/Menu/MenuVC.m +++ b/Muhit/ViewControllers/Menu/MenuVC.m @@ -90,23 +90,22 @@ -(void)reloadMenu{ - (void)openMain:(id)sender{ [ScreenOperations openMain]; - [[MT drawerController] closeDrawerAnimated:YES completion:nil]; } -- (void)openSupports:(id)sender{ - [ScreenOperations openSupports]; +- (void)openSupporteds:(id)sender{ + [ScreenOperations openSupporteds:YES]; } - (void)openIdeas:(id)sender{ - [ScreenOperations openIdeas]; + [ScreenOperations openIdeas:YES]; } - (void)openAnnouncements:(id)sender{ - [ScreenOperations openAnnouncements]; + [ScreenOperations openAnnouncements:YES]; } - (void)openHeadman:(id)sender{ - [ScreenOperations openHeadman]; + [ScreenOperations openHeadman:YES]; } - (IBAction)actLogin:(id)sender{ diff --git a/Muhit/ViewControllers/Root/RootVC.h b/Muhit/ViewControllers/Root/RootVC.h index 123141a..5e56260 100755 --- a/Muhit/ViewControllers/Root/RootVC.h +++ b/Muhit/ViewControllers/Root/RootVC.h @@ -15,6 +15,5 @@ - (void) setMuhitLogo; - (void) back; - (void) setLocalizedStrings; -- (void)resetScrollOffset; - +- (void) resetScrollOffset; @end diff --git a/Muhit/ViewControllers/Supporteds/SupportedsVC.h b/Muhit/ViewControllers/Supporteds/SupportedsVC.h index b7d21e3..dffbae1 100755 --- a/Muhit/ViewControllers/Supporteds/SupportedsVC.h +++ b/Muhit/ViewControllers/Supporteds/SupportedsVC.h @@ -8,4 +8,6 @@ @interface SupportedsVC : RootVC +- (id)initFromMenu; + @end diff --git a/Muhit/ViewControllers/Supporteds/SupportedsVC.m b/Muhit/ViewControllers/Supporteds/SupportedsVC.m index 604505c..582776c 100755 --- a/Muhit/ViewControllers/Supporteds/SupportedsVC.m +++ b/Muhit/ViewControllers/Supporteds/SupportedsVC.m @@ -11,17 +11,34 @@ @interface SupportedsVC (){ IBOutlet UITableView *tblSupporteds; - IBOutlet UIButton *btnCreateIssue; + IBOutlet UIButton *btnCreateIssue,*btnMenu;; NSArray *arrSupporteds; + BOOL fromMenu; } - @end @implementation SupportedsVC +- (id)initFromMenu{ + self = [super init]; + if (self){ + fromMenu = YES; + } + return self; +} + - (void)viewDidLoad { [super viewDidLoad]; + if (fromMenu) { + [btnMenu setSize:CGSizeMake(40, 36)]; + [btnMenu setImage:[IonIcons imageWithIcon:ion_navicon size:36 color:CLR_WHITE]]; + UIBarButtonItem *barBtnMenu = [[UIBarButtonItem alloc] initWithCustomView:btnMenu]; + UIBarButtonItem *negativeSpacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemFixedSpace target:nil action:nil]; + negativeSpacer.width = -12; + [[self navigationItem] setLeftBarButtonItems:[NSArray arrayWithObjects:negativeSpacer, barBtnMenu, nil] animated:NO]; + } + btnCreateIssue.layer.cornerRadius = cornerRadius; [btnCreateIssue setSize:CGSizeMake(70, 35)]; [btnCreateIssue setImage:[IonIcons imageWithIcon:ion_plus size:15 color:CLR_WHITE]]; @@ -52,6 +69,12 @@ -(void)test{ [tblSupporteds reloadData]; } + +-(IBAction)actMenu:(id)sender{ + [self.view endEditing:YES]; + [[MT drawerController] toggleDrawerSide:MMDrawerSideLeft animated:YES completion:nil]; +} + -(IBAction)actCreateIssue:(id)sender{ if ([MT isLoggedIn]) { [ScreenOperations openCreateIssue]; @@ -104,7 +127,7 @@ - (void)didReceiveMemoryWarning { } - (void)setLocalizedStrings{ - [self setTitle:LocalizedString(@"my-supporteds")]; + [[self navigationItem] setTitleView:[UF titleViewWithTitle:LocalizedString(@"my-supporteds")]]; } @end diff --git a/Muhit/ViewControllers/Supporteds/SupportedsVC.xib b/Muhit/ViewControllers/Supporteds/SupportedsVC.xib index 970a618..f666486 100755 --- a/Muhit/ViewControllers/Supporteds/SupportedsVC.xib +++ b/Muhit/ViewControllers/Supporteds/SupportedsVC.xib @@ -13,6 +13,7 @@ + @@ -52,6 +53,18 @@ +