From fb6e0625398fb8300e0749cd558d9796d08d46e6 Mon Sep 17 00:00:00 2001 From: Emre YANIK Date: Thu, 16 Jun 2016 15:47:15 +0300 Subject: [PATCH] design updates #6 --- Muhit.xcodeproj/project.pbxproj | 41 ++++-- Muhit/AppDelegate.m | 2 + .../muhit-tea-glass.imageset/Contents.json | 23 ++++ .../muhit-tea-glass.png | Bin 0 -> 473 bytes .../muhit-tea-glass@2x.png | Bin 0 -> 1018 bytes .../muhit-tea-glass@3x.png | Bin 0 -> 1584 bytes Muhit/Classes/NavBar.m | 2 +- Muhit/Classes/ScreenOperations.h | 8 +- Muhit/Classes/ScreenOperations.m | 64 +++++++-- Muhit/Classes/UtilityFunctions.h | 1 + Muhit/Classes/UtilityFunctions.m | 20 +++ .../AddEditIssue/AddEditIssueVC.m | 33 +---- .../AddEditIssue/AddEditIssueVC.xib | 60 +++++---- .../Announcements/AnnouncementsVC.h | 2 + .../Announcements/AnnouncementsVC.m | 33 ++++- .../Announcements/AnnouncementsVC.xib | 16 +++ Muhit/ViewControllers/Headman/HeadmanVC.h | 2 + Muhit/ViewControllers/Headman/HeadmanVC.m | 29 +++- Muhit/ViewControllers/Headman/HeadmanVC.xib | 14 ++ Muhit/ViewControllers/Ideas/IdeasVC.h | 15 +++ Muhit/ViewControllers/Ideas/IdeasVC.m | 127 ++++++++++++++++++ Muhit/ViewControllers/Ideas/IdeasVC.xib | 54 ++++++++ .../ForgotPassword}/ForgotPasswordVC.h | 0 .../ForgotPassword}/ForgotPasswordVC.m | 0 .../ForgotPassword}/ForgotPasswordVC.xib | 0 .../{Signup => Membering/Login}/LoginVC.h | 0 .../{Signup => Membering/Login}/LoginVC.m | 0 .../{Signup => Membering/Login}/LoginVC.xib | 0 .../Signup}/SignupVC.h | 0 .../Signup}/SignupVC.m | 0 .../Signup}/SignupVC.xib | 0 Muhit/ViewControllers/Menu/MenuVC.h | 2 +- Muhit/ViewControllers/Menu/MenuVC.m | 11 +- Muhit/ViewControllers/Root/RootVC.h | 3 +- .../ViewControllers/Supporteds/SupportedsVC.h | 2 + .../ViewControllers/Supporteds/SupportedsVC.m | 29 +++- .../Supporteds/SupportedsVC.xib | 13 ++ 37 files changed, 511 insertions(+), 95 deletions(-) create mode 100644 Muhit/Assets/Images.xcassets/muhit-tea-glass.imageset/Contents.json create mode 100644 Muhit/Assets/Images.xcassets/muhit-tea-glass.imageset/muhit-tea-glass.png create mode 100644 Muhit/Assets/Images.xcassets/muhit-tea-glass.imageset/muhit-tea-glass@2x.png create mode 100644 Muhit/Assets/Images.xcassets/muhit-tea-glass.imageset/muhit-tea-glass@3x.png create mode 100644 Muhit/ViewControllers/Ideas/IdeasVC.h create mode 100644 Muhit/ViewControllers/Ideas/IdeasVC.m create mode 100644 Muhit/ViewControllers/Ideas/IdeasVC.xib rename Muhit/ViewControllers/{Login => Membering/ForgotPassword}/ForgotPasswordVC.h (100%) rename Muhit/ViewControllers/{Login => Membering/ForgotPassword}/ForgotPasswordVC.m (100%) rename Muhit/ViewControllers/{Login => Membering/ForgotPassword}/ForgotPasswordVC.xib (100%) rename Muhit/ViewControllers/{Signup => Membering/Login}/LoginVC.h (100%) rename Muhit/ViewControllers/{Signup => Membering/Login}/LoginVC.m (100%) rename Muhit/ViewControllers/{Signup => Membering/Login}/LoginVC.xib (100%) rename Muhit/ViewControllers/{ForgotPassword => Membering/Signup}/SignupVC.h (100%) rename Muhit/ViewControllers/{ForgotPassword => Membering/Signup}/SignupVC.m (100%) rename Muhit/ViewControllers/{ForgotPassword => Membering/Signup}/SignupVC.xib (100%) 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 0000000000000000000000000000000000000000..b8c82381be331740981c773c9863db2243335816 GIT binary patch literal 473 zcmV;~0Ve*5P)Px$lSxEDR5%fhlg%qcQ5eSWmCxB=e2dhSq9L=fLlRlYUt(k7FHvljrM0Ei6tW;S zDJf+!#TZ`^lDK})?Vjm49XD@1_rCA*yyxlM^PU?y86&S>leJ;{QH5R(>) zYtWjIX|H$0KJW(W!5EkZL4eUFNQ+&>3fPVpBoFEh&{dbzJGSV_PvN>jt&hcx)cs)? zR*lIa#0U5*UJ<@Q(Q23^FR6}AaFfBM2v1bt+CiDVXG<@TpQ|=IQGTa~CvM07CH6DJK>~tc?LyzLigedWa%5S^kecF z)#h{N$U_mHXo7nIn$EnXpO6nHm=uoRp-!OIA?Bu`^-BRbV4EBw{fp(BDg1vYm5CatY z588km+NG|34om=zRX^hrC~?3mwXtF}1-T9yfE${`8h8R*iCE;lipl2>RHcd+U|v_~ P00000NkvXXu0mjfs*lsM literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..91231a702ad1d3902f20f6611894836ad0913366 GIT binary patch literal 1018 zcmV>lXf00001b5ch_0Itp) z=>Px&v`IukR9Fekn9EDlQ544=O~cCRos~VT#E_swTJ*3W!-YlEwuQ8;Xwe_gszp$n z7PV;Gu4Rx^5@}&rNEo##&`K>TdTAxT(wshL=HBuAe*S)U<~L)|f$y9%=X}p&?)}ZZ zqXh;3iNs`%L?TgxYWzntb;e?`Zh9=Gesf5VRy#-)gdUK5A41O6UC$t$3{pse#iob! z5v&DWKo%k;5buDwmS?tpkfzxcaLW_JadZx*xK51@Rp+FqiFyO43=D%~%AI^pN^pJ$ z`A8kf?@fUT^fFHq^@iAKApJ_jE&G-f_VG7Hi+P)i>LY0itTV|EsX6EKSXOK2(?6QT?u386(OYaWF_nJ)G52DHx z332eoB#xkqyp?C(5xWY$&Un-_qMW_T&eoKiNwCQzyk+nIIFjp#z0z_2)<~>h6SA~r zka8f0l*m9zg}!bf@Kc^(+P z90g&rfPnO!)`XxzLLV}n7+}j8V#QS>VMwKxEIMeAMVgSMEk*TGht}XB9)&9_wno&$W<flp|A(%KejP3*qm)rvE{A~@xU-kxSgH}>pS7!EOMdpFqeNq?QjO=f^$8b8XKP!;>xb4C0zz)ebd_h-?E- z6~k4t&+xX2)+^%rx~bYuQ!YMzt9lMCU#47?B9-!@2a(e;Uy(s<1F02v6ts6vFvf3i3RU5Uvi)X_arBGUgUGL}d_`*1 zt0J$J?KgKCN3!oc6}8`M<%(p!gWUsesH`?+`^^)^an~P^{|fYiT;&vrXH@bacFC+J zIPf1aJo#&I`7933vxX2=wUE#V##Q3QSq)M{RKXcCyh}kGnY0kJ8&W>%1Px)>PbXFRA>e5T3d)#RTOq?DlIi^n#!amurdqjGKGdg(G~3>qKBe->7k&fpa&l$ z=rM@i4NNLXq6>6`E*9#8L) zYwdO4_kI4EG2{R8-|T@d3u|m_>;d2_jh@DOu&b-ic7T%>iEO)z)~fG4^y1D==!UlI6&Di=)#8J~clUMo~Ll^zW? zuMou_;O~I6m66v4=4UDtO(qBpsc?rh?@v6Cmx`UrelSJ3R?Z6gJH<}!2H^QAyNlN= z!gmM8LJ>&ubE(ta=kOLa)d+wM%o9oEKU%Te3-(CBwy9XR*%l4?^0H23Fu$ zJ0c@imdq&`$DHX$BolQ3 zVaez&l;X!W3l4(bx=WKew;-sgHlH38e-i^KetvekdR~<#bFovb13fPo`9_ST`1#K1 z>P@0FnZ-`A4)pwB@>T%419H`H1Bg0U~fXdnF9VJNIDiBq2& zfZZgn&vNr$XN=D;h-Vm4Q@s>H^CKR6_b;)T>t*44a(f^a!QO?QQM5JR;)QC$d3rBG z?~bDWL~N$`+vs%fa(H~2K|r6iUZ)d$c~I7u?8*eA??cwsO(vO~4Gi6BfTMsW$_sP| z!^VlL@`p znz^ltwJFLhKu=zTb#nsx7Lb`r@w>^CP){t0e>)k*U^|yz$ZWp>iB_EvTOogpN+>qk z*=Yu2d<8CPi8S}e&W8`g1+P2TNL!S|$np(jH;LX5cQzRaTo%=?x3Qn*5YT>9!^BS>07(eWwqb=zNVliGhC)!6Yl`FWt(1C ziOs!2N6B!w`bXU!3TiU?aEco1u<;}6BOrdw?-N@?LKl(Cz~~N4j&yWnm<)fBYO-t& z#vhD08HlvSnjUhE+cDB3j&7squ~z_1l|wMx16T|g5huAHkJ?eSG3cBrx~tn*#-Cmr7KLYr>Wxfmhy zi0D4fs>~yIO0ey^m?T@ggM>({H)+3S%g2O+dYk=vIH>M_lNHx(_b2V z5fh3}0GcSz!Kh6cCc+OXldV;L$S52UotM#^VBiigxQ^;7-(s%6=#9Y#ABM5@WNU)w i-}BJ3AFaH43;zd(ZDx}qAaF|n0000 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 @@ +