Grouped Style TableView, Bar Button Items Actions
@@ -20,7 +20,7 @@
|
||||
240496C5176E110E00EF2CE2 /* PBViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 240496BA176E110E00EF2CE2 /* PBViewController.m */; };
|
||||
240496D3176E1E7200EF2CE2 /* avatar.png in Resources */ = {isa = PBXBuildFile; fileRef = 240496D2176E1E7100EF2CE2 /* avatar.png */; };
|
||||
240496DD176E379C00EF2CE2 /* PBFlatSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = 240496DC176E379C00EF2CE2 /* PBFlatSettings.m */; };
|
||||
240496E2176E37B800EF2CE2 /* PBBarButtonIconView.m in Sources */ = {isa = PBXBuildFile; fileRef = 240496DF176E37B800EF2CE2 /* PBBarButtonIconView.m */; };
|
||||
240496E2176E37B800EF2CE2 /* PBBarButtonIconButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 240496DF176E37B800EF2CE2 /* PBBarButtonIconButton.m */; };
|
||||
240496E3176E37B800EF2CE2 /* PBFlatBarButtonItems.m in Sources */ = {isa = PBXBuildFile; fileRef = 240496E1176E37B800EF2CE2 /* PBFlatBarButtonItems.m */; };
|
||||
240496E8176E37CA00EF2CE2 /* PBFlatButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 240496E5176E37CA00EF2CE2 /* PBFlatButton.m */; };
|
||||
240496E9176E37CA00EF2CE2 /* PBFlatButtonWithIcon.m in Sources */ = {isa = PBXBuildFile; fileRef = 240496E7176E37CA00EF2CE2 /* PBFlatButtonWithIcon.m */; };
|
||||
@@ -29,6 +29,36 @@
|
||||
240496F2176E37F900EF2CE2 /* PBFlatTextfield.m in Sources */ = {isa = PBXBuildFile; fileRef = 240496F1176E37F900EF2CE2 /* PBFlatTextfield.m */; };
|
||||
240496F7176E380C00EF2CE2 /* PBIconDrawning.m in Sources */ = {isa = PBXBuildFile; fileRef = 240496F4176E380C00EF2CE2 /* PBIconDrawning.m */; };
|
||||
240496F8176E380C00EF2CE2 /* UIImage+Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = 240496F6176E380C00EF2CE2 /* UIImage+Additions.m */; };
|
||||
245BB59E176FC92500FBB147 /* PBFlatGroupedStyleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 245BB59D176FC92500FBB147 /* PBFlatGroupedStyleCell.m */; };
|
||||
245BB5E317706E2E00FBB147 /* airplane.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5CD17706E2E00FBB147 /* airplane.png */; };
|
||||
245BB5E417706E2E00FBB147 /* airplane@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5CE17706E2E00FBB147 /* airplane@2x.png */; };
|
||||
245BB5E517706E2E00FBB147 /* block.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5CF17706E2E00FBB147 /* block.png */; };
|
||||
245BB5E617706E2E00FBB147 /* block@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5D017706E2E00FBB147 /* block@2x.png */; };
|
||||
245BB5E717706E2E00FBB147 /* bluetooth.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5D117706E2E00FBB147 /* bluetooth.png */; };
|
||||
245BB5E817706E2E00FBB147 /* bluetooth@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5D217706E2E00FBB147 /* bluetooth@2x.png */; };
|
||||
245BB5E917706E2E00FBB147 /* brightness.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5D317706E2E00FBB147 /* brightness.png */; };
|
||||
245BB5EA17706E2E00FBB147 /* brightness@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5D417706E2E00FBB147 /* brightness@2x.png */; };
|
||||
245BB5EB17706E2E00FBB147 /* donotdisturb.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5D517706E2E00FBB147 /* donotdisturb.png */; };
|
||||
245BB5EC17706E2E00FBB147 /* donotdisturb@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5D617706E2E00FBB147 /* donotdisturb@2x.png */; };
|
||||
245BB5ED17706E2E00FBB147 /* general.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5D717706E2E00FBB147 /* general.png */; };
|
||||
245BB5EE17706E2E00FBB147 /* general@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5D817706E2E00FBB147 /* general@2x.png */; };
|
||||
245BB5EF17706E2E00FBB147 /* gsm.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5D917706E2E00FBB147 /* gsm.png */; };
|
||||
245BB5F017706E2E00FBB147 /* gsm@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5DA17706E2E00FBB147 /* gsm@2x.png */; };
|
||||
245BB5F117706E2E00FBB147 /* hotspot.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5DB17706E2E00FBB147 /* hotspot.png */; };
|
||||
245BB5F217706E2E00FBB147 /* hotspot@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5DC17706E2E00FBB147 /* hotspot@2x.png */; };
|
||||
245BB5F317706E2E00FBB147 /* notification.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5DD17706E2E00FBB147 /* notification.png */; };
|
||||
245BB5F417706E2E00FBB147 /* notification@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5DE17706E2E00FBB147 /* notification@2x.png */; };
|
||||
245BB5F517706E2E00FBB147 /* sounds.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5DF17706E2E00FBB147 /* sounds.png */; };
|
||||
245BB5F617706E2E00FBB147 /* sounds@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5E017706E2E00FBB147 /* sounds@2x.png */; };
|
||||
245BB5F717706E2E00FBB147 /* wifi.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5E117706E2E00FBB147 /* wifi.png */; };
|
||||
245BB5F817706E2E00FBB147 /* wifi@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5E217706E2E00FBB147 /* wifi@2x.png */; };
|
||||
245BB5FB1770799300FBB147 /* i_icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5F91770799300FBB147 /* i_icon.png */; };
|
||||
245BB5FC1770799300FBB147 /* i_icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 245BB5FA1770799300FBB147 /* i_icon@2x.png */; };
|
||||
24C89DBE1770A1CA009945B2 /* cn.png in Resources */ = {isa = PBXBuildFile; fileRef = 24C89DBB1770A1CA009945B2 /* cn.png */; };
|
||||
24C89DBF1770A1CA009945B2 /* js.png in Resources */ = {isa = PBXBuildFile; fileRef = 24C89DBC1770A1CA009945B2 /* js.png */; };
|
||||
24C89DC01770A1CA009945B2 /* tl.png in Resources */ = {isa = PBXBuildFile; fileRef = 24C89DBD1770A1CA009945B2 /* tl.png */; };
|
||||
24D510CB176F9EE000529935 /* PBFlatGroupedTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 24D510CA176F9EE000529935 /* PBFlatGroupedTableViewController.m */; };
|
||||
24D510CF176FA5DA00529935 /* PBExampleTableVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 24D510CE176FA5DA00529935 /* PBExampleTableVC.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
@@ -51,8 +81,8 @@
|
||||
240496D2176E1E7100EF2CE2 /* avatar.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = avatar.png; sourceTree = "<group>"; };
|
||||
240496DB176E379C00EF2CE2 /* PBFlatSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PBFlatSettings.h; path = Classess/PBFlatSettings.h; sourceTree = "<group>"; };
|
||||
240496DC176E379C00EF2CE2 /* PBFlatSettings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PBFlatSettings.m; path = Classess/PBFlatSettings.m; sourceTree = "<group>"; };
|
||||
240496DE176E37B800EF2CE2 /* PBBarButtonIconView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PBBarButtonIconView.h; path = Classess/PBBarButtonIconView.h; sourceTree = "<group>"; };
|
||||
240496DF176E37B800EF2CE2 /* PBBarButtonIconView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PBBarButtonIconView.m; path = Classess/PBBarButtonIconView.m; sourceTree = "<group>"; };
|
||||
240496DE176E37B800EF2CE2 /* PBBarButtonIconButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PBBarButtonIconButton.h; path = Classess/PBBarButtonIconButton.h; sourceTree = "<group>"; };
|
||||
240496DF176E37B800EF2CE2 /* PBBarButtonIconButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PBBarButtonIconButton.m; path = Classess/PBBarButtonIconButton.m; sourceTree = "<group>"; };
|
||||
240496E0176E37B800EF2CE2 /* PBFlatBarButtonItems.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PBFlatBarButtonItems.h; path = Classess/PBFlatBarButtonItems.h; sourceTree = "<group>"; };
|
||||
240496E1176E37B800EF2CE2 /* PBFlatBarButtonItems.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PBFlatBarButtonItems.m; path = Classess/PBFlatBarButtonItems.m; sourceTree = "<group>"; };
|
||||
240496E4176E37CA00EF2CE2 /* PBFlatButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PBFlatButton.h; path = Classess/PBFlatButton.h; sourceTree = "<group>"; };
|
||||
@@ -69,6 +99,39 @@
|
||||
240496F4176E380C00EF2CE2 /* PBIconDrawning.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PBIconDrawning.m; path = Classess/PBIconDrawning.m; sourceTree = "<group>"; };
|
||||
240496F5176E380C00EF2CE2 /* UIImage+Additions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIImage+Additions.h"; path = "Classess/UIImage+Additions.h"; sourceTree = "<group>"; };
|
||||
240496F6176E380C00EF2CE2 /* UIImage+Additions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIImage+Additions.m"; path = "Classess/UIImage+Additions.m"; sourceTree = "<group>"; };
|
||||
245BB59C176FC92500FBB147 /* PBFlatGroupedStyleCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PBFlatGroupedStyleCell.h; path = Classess/PBFlatGroupedStyleCell.h; sourceTree = "<group>"; };
|
||||
245BB59D176FC92500FBB147 /* PBFlatGroupedStyleCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PBFlatGroupedStyleCell.m; path = Classess/PBFlatGroupedStyleCell.m; sourceTree = "<group>"; };
|
||||
245BB5CD17706E2E00FBB147 /* airplane.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = airplane.png; sourceTree = "<group>"; };
|
||||
245BB5CE17706E2E00FBB147 /* airplane@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "airplane@2x.png"; sourceTree = "<group>"; };
|
||||
245BB5CF17706E2E00FBB147 /* block.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = block.png; sourceTree = "<group>"; };
|
||||
245BB5D017706E2E00FBB147 /* block@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "block@2x.png"; sourceTree = "<group>"; };
|
||||
245BB5D117706E2E00FBB147 /* bluetooth.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bluetooth.png; sourceTree = "<group>"; };
|
||||
245BB5D217706E2E00FBB147 /* bluetooth@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "bluetooth@2x.png"; sourceTree = "<group>"; };
|
||||
245BB5D317706E2E00FBB147 /* brightness.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = brightness.png; sourceTree = "<group>"; };
|
||||
245BB5D417706E2E00FBB147 /* brightness@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "brightness@2x.png"; sourceTree = "<group>"; };
|
||||
245BB5D517706E2E00FBB147 /* donotdisturb.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = donotdisturb.png; sourceTree = "<group>"; };
|
||||
245BB5D617706E2E00FBB147 /* donotdisturb@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "donotdisturb@2x.png"; sourceTree = "<group>"; };
|
||||
245BB5D717706E2E00FBB147 /* general.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = general.png; sourceTree = "<group>"; };
|
||||
245BB5D817706E2E00FBB147 /* general@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "general@2x.png"; sourceTree = "<group>"; };
|
||||
245BB5D917706E2E00FBB147 /* gsm.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = gsm.png; sourceTree = "<group>"; };
|
||||
245BB5DA17706E2E00FBB147 /* gsm@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "gsm@2x.png"; sourceTree = "<group>"; };
|
||||
245BB5DB17706E2E00FBB147 /* hotspot.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = hotspot.png; sourceTree = "<group>"; };
|
||||
245BB5DC17706E2E00FBB147 /* hotspot@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "hotspot@2x.png"; sourceTree = "<group>"; };
|
||||
245BB5DD17706E2E00FBB147 /* notification.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = notification.png; sourceTree = "<group>"; };
|
||||
245BB5DE17706E2E00FBB147 /* notification@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "notification@2x.png"; sourceTree = "<group>"; };
|
||||
245BB5DF17706E2E00FBB147 /* sounds.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sounds.png; sourceTree = "<group>"; };
|
||||
245BB5E017706E2E00FBB147 /* sounds@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sounds@2x.png"; sourceTree = "<group>"; };
|
||||
245BB5E117706E2E00FBB147 /* wifi.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = wifi.png; sourceTree = "<group>"; };
|
||||
245BB5E217706E2E00FBB147 /* wifi@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "wifi@2x.png"; sourceTree = "<group>"; };
|
||||
245BB5F91770799300FBB147 /* i_icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = i_icon.png; sourceTree = "<group>"; };
|
||||
245BB5FA1770799300FBB147 /* i_icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "i_icon@2x.png"; sourceTree = "<group>"; };
|
||||
24C89DBB1770A1CA009945B2 /* cn.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cn.png; sourceTree = "<group>"; };
|
||||
24C89DBC1770A1CA009945B2 /* js.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = js.png; sourceTree = "<group>"; };
|
||||
24C89DBD1770A1CA009945B2 /* tl.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tl.png; sourceTree = "<group>"; };
|
||||
24D510C9176F9EE000529935 /* PBFlatGroupedTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBFlatGroupedTableViewController.h; sourceTree = "<group>"; };
|
||||
24D510CA176F9EE000529935 /* PBFlatGroupedTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBFlatGroupedTableViewController.m; sourceTree = "<group>"; };
|
||||
24D510CD176FA5DA00529935 /* PBExampleTableVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBExampleTableVC.h; sourceTree = "<group>"; };
|
||||
24D510CE176FA5DA00529935 /* PBExampleTableVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBExampleTableVC.m; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -119,7 +182,10 @@
|
||||
240496DC176E379C00EF2CE2 /* PBFlatSettings.m */,
|
||||
240496B9176E110E00EF2CE2 /* PBViewController.h */,
|
||||
240496BA176E110E00EF2CE2 /* PBViewController.m */,
|
||||
24D510CD176FA5DA00529935 /* PBExampleTableVC.h */,
|
||||
24D510CE176FA5DA00529935 /* PBExampleTableVC.m */,
|
||||
240496A8176E0FD700EF2CE2 /* MainStoryboard.storyboard */,
|
||||
24D510CC176FA5B100529935 /* Grouped Table View Controller */,
|
||||
240496D4176E1E9900EF2CE2 /* Bar Items */,
|
||||
240496D5176E1EA500EF2CE2 /* Buttons */,
|
||||
240496D6176E1EB100EF2CE2 /* Image View */,
|
||||
@@ -149,8 +215,8 @@
|
||||
240496D4176E1E9900EF2CE2 /* Bar Items */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
240496DE176E37B800EF2CE2 /* PBBarButtonIconView.h */,
|
||||
240496DF176E37B800EF2CE2 /* PBBarButtonIconView.m */,
|
||||
240496DE176E37B800EF2CE2 /* PBBarButtonIconButton.h */,
|
||||
240496DF176E37B800EF2CE2 /* PBBarButtonIconButton.m */,
|
||||
240496E0176E37B800EF2CE2 /* PBFlatBarButtonItems.h */,
|
||||
240496E1176E37B800EF2CE2 /* PBFlatBarButtonItems.m */,
|
||||
);
|
||||
@@ -211,11 +277,57 @@
|
||||
240496DA176E1F0200EF2CE2 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
245BB5CC17706E2E00FBB147 /* icons */,
|
||||
240496D2176E1E7100EF2CE2 /* avatar.png */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
245BB5CC17706E2E00FBB147 /* icons */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
24C89DBB1770A1CA009945B2 /* cn.png */,
|
||||
24C89DBC1770A1CA009945B2 /* js.png */,
|
||||
24C89DBD1770A1CA009945B2 /* tl.png */,
|
||||
245BB5F91770799300FBB147 /* i_icon.png */,
|
||||
245BB5FA1770799300FBB147 /* i_icon@2x.png */,
|
||||
245BB5CD17706E2E00FBB147 /* airplane.png */,
|
||||
245BB5CE17706E2E00FBB147 /* airplane@2x.png */,
|
||||
245BB5CF17706E2E00FBB147 /* block.png */,
|
||||
245BB5D017706E2E00FBB147 /* block@2x.png */,
|
||||
245BB5D117706E2E00FBB147 /* bluetooth.png */,
|
||||
245BB5D217706E2E00FBB147 /* bluetooth@2x.png */,
|
||||
245BB5D317706E2E00FBB147 /* brightness.png */,
|
||||
245BB5D417706E2E00FBB147 /* brightness@2x.png */,
|
||||
245BB5D517706E2E00FBB147 /* donotdisturb.png */,
|
||||
245BB5D617706E2E00FBB147 /* donotdisturb@2x.png */,
|
||||
245BB5D717706E2E00FBB147 /* general.png */,
|
||||
245BB5D817706E2E00FBB147 /* general@2x.png */,
|
||||
245BB5D917706E2E00FBB147 /* gsm.png */,
|
||||
245BB5DA17706E2E00FBB147 /* gsm@2x.png */,
|
||||
245BB5DB17706E2E00FBB147 /* hotspot.png */,
|
||||
245BB5DC17706E2E00FBB147 /* hotspot@2x.png */,
|
||||
245BB5DD17706E2E00FBB147 /* notification.png */,
|
||||
245BB5DE17706E2E00FBB147 /* notification@2x.png */,
|
||||
245BB5DF17706E2E00FBB147 /* sounds.png */,
|
||||
245BB5E017706E2E00FBB147 /* sounds@2x.png */,
|
||||
245BB5E117706E2E00FBB147 /* wifi.png */,
|
||||
245BB5E217706E2E00FBB147 /* wifi@2x.png */,
|
||||
);
|
||||
path = icons;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
24D510CC176FA5B100529935 /* Grouped Table View Controller */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
24D510C9176F9EE000529935 /* PBFlatGroupedTableViewController.h */,
|
||||
24D510CA176F9EE000529935 /* PBFlatGroupedTableViewController.m */,
|
||||
245BB59C176FC92500FBB147 /* PBFlatGroupedStyleCell.h */,
|
||||
245BB59D176FC92500FBB147 /* PBFlatGroupedStyleCell.m */,
|
||||
);
|
||||
name = "Grouped Table View Controller";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@@ -274,6 +386,33 @@
|
||||
2404969C176E0FC500EF2CE2 /* Default-568h@2x.png in Resources */,
|
||||
240496A9176E0FD700EF2CE2 /* MainStoryboard.storyboard in Resources */,
|
||||
240496D3176E1E7200EF2CE2 /* avatar.png in Resources */,
|
||||
245BB5E317706E2E00FBB147 /* airplane.png in Resources */,
|
||||
245BB5E417706E2E00FBB147 /* airplane@2x.png in Resources */,
|
||||
245BB5E517706E2E00FBB147 /* block.png in Resources */,
|
||||
245BB5E617706E2E00FBB147 /* block@2x.png in Resources */,
|
||||
245BB5E717706E2E00FBB147 /* bluetooth.png in Resources */,
|
||||
245BB5E817706E2E00FBB147 /* bluetooth@2x.png in Resources */,
|
||||
245BB5E917706E2E00FBB147 /* brightness.png in Resources */,
|
||||
245BB5EA17706E2E00FBB147 /* brightness@2x.png in Resources */,
|
||||
245BB5EB17706E2E00FBB147 /* donotdisturb.png in Resources */,
|
||||
245BB5EC17706E2E00FBB147 /* donotdisturb@2x.png in Resources */,
|
||||
245BB5ED17706E2E00FBB147 /* general.png in Resources */,
|
||||
245BB5EE17706E2E00FBB147 /* general@2x.png in Resources */,
|
||||
245BB5EF17706E2E00FBB147 /* gsm.png in Resources */,
|
||||
245BB5F017706E2E00FBB147 /* gsm@2x.png in Resources */,
|
||||
245BB5F117706E2E00FBB147 /* hotspot.png in Resources */,
|
||||
245BB5F217706E2E00FBB147 /* hotspot@2x.png in Resources */,
|
||||
245BB5F317706E2E00FBB147 /* notification.png in Resources */,
|
||||
245BB5F417706E2E00FBB147 /* notification@2x.png in Resources */,
|
||||
245BB5F517706E2E00FBB147 /* sounds.png in Resources */,
|
||||
245BB5F617706E2E00FBB147 /* sounds@2x.png in Resources */,
|
||||
245BB5F717706E2E00FBB147 /* wifi.png in Resources */,
|
||||
245BB5F817706E2E00FBB147 /* wifi@2x.png in Resources */,
|
||||
245BB5FB1770799300FBB147 /* i_icon.png in Resources */,
|
||||
245BB5FC1770799300FBB147 /* i_icon@2x.png in Resources */,
|
||||
24C89DBE1770A1CA009945B2 /* cn.png in Resources */,
|
||||
24C89DBF1770A1CA009945B2 /* js.png in Resources */,
|
||||
24C89DC01770A1CA009945B2 /* tl.png in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -288,7 +427,7 @@
|
||||
24049696176E0FC500EF2CE2 /* PBFlatAppDelegate.m in Sources */,
|
||||
240496C5176E110E00EF2CE2 /* PBViewController.m in Sources */,
|
||||
240496DD176E379C00EF2CE2 /* PBFlatSettings.m in Sources */,
|
||||
240496E2176E37B800EF2CE2 /* PBBarButtonIconView.m in Sources */,
|
||||
240496E2176E37B800EF2CE2 /* PBBarButtonIconButton.m in Sources */,
|
||||
240496E3176E37B800EF2CE2 /* PBFlatBarButtonItems.m in Sources */,
|
||||
240496E8176E37CA00EF2CE2 /* PBFlatButton.m in Sources */,
|
||||
240496E9176E37CA00EF2CE2 /* PBFlatButtonWithIcon.m in Sources */,
|
||||
@@ -297,6 +436,9 @@
|
||||
240496F2176E37F900EF2CE2 /* PBFlatTextfield.m in Sources */,
|
||||
240496F7176E380C00EF2CE2 /* PBIconDrawning.m in Sources */,
|
||||
240496F8176E380C00EF2CE2 /* UIImage+Additions.m in Sources */,
|
||||
24D510CB176F9EE000529935 /* PBFlatGroupedTableViewController.m in Sources */,
|
||||
24D510CF176FA5DA00529935 /* PBExampleTableVC.m in Sources */,
|
||||
245BB59E176FC92500FBB147 /* PBFlatGroupedStyleCell.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// PBBarButtonIconView.h
|
||||
// PBBarButtonIconButton.h
|
||||
// FlatUI
|
||||
//
|
||||
// Created by Piotr Bernad on 16.06.2013.
|
||||
@@ -9,6 +9,7 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "PBIconDrawning.h"
|
||||
|
||||
@interface PBBarButtonIconView : UIView
|
||||
-(id)initWithFrame:(CGRect)frame andWithType:(PBFlatIconType)type;
|
||||
@interface PBBarButtonIconButton : UIButton
|
||||
- (id)initWithFrame:(CGRect)frame andWithType:(PBFlatIconType)type;
|
||||
- (void)setType:(PBFlatIconType)type;
|
||||
@end
|
||||
@@ -1,15 +1,15 @@
|
||||
//
|
||||
// PBBarButtonIconView.m
|
||||
// PBBarButtonIconButton.m
|
||||
// FlatUI
|
||||
//
|
||||
// Created by Piotr Bernad on 16.06.2013.
|
||||
// Copyright (c) 2013 Piotr Bernad. All rights reserved.
|
||||
//
|
||||
|
||||
#import "PBBarButtonIconView.h"
|
||||
#import "PBBarButtonIconButton.h"
|
||||
#import "PBFlatSettings.h"
|
||||
|
||||
@implementation PBBarButtonIconView {
|
||||
@implementation PBBarButtonIconButton {
|
||||
PBFlatIconType _type;
|
||||
}
|
||||
-(id)initWithFrame:(CGRect)frame andWithType:(PBFlatIconType)type {
|
||||
@@ -24,5 +24,9 @@
|
||||
[PBIconDrawning drawIconInRect:rect withType:_type color:[[PBFlatSettings sharedInstance] mainColor]];
|
||||
|
||||
}
|
||||
- (void)setType:(PBFlatIconType)type {
|
||||
_type = type;
|
||||
[self setNeedsDisplay];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -9,14 +9,13 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "PBFlatSettings.h"
|
||||
#import "PBIconDrawning.h"
|
||||
#import "PBBarButtonIconView.h"
|
||||
#import "PBBarButtonIconButton.h"
|
||||
|
||||
@interface PBFlatBarButtonItems : UIBarButtonItem
|
||||
+ (UIBarButtonItem *)addBarButtonItem;
|
||||
+ (UIBarButtonItem *)moreBarButtonItem;
|
||||
+ (UIBarButtonItem *)menuBarButtonItem;
|
||||
+ (UIBarButtonItem *)searchBarButtonItem;
|
||||
+ (UIBarButtonItem *)backBarButtonItem;
|
||||
+ (UIBarButtonItem *)forwardBarButtonItem;
|
||||
|
||||
+ (UIBarButtonItem *)addBarButtonItemWithTarget:(id)target selector:(SEL)selector;
|
||||
+ (UIBarButtonItem *)moreBarButtonItemWithTarget:(id)target selector:(SEL)selector;
|
||||
+ (UIBarButtonItem *)menuBarButtonItemWithTarget:(id)target selector:(SEL)selector;
|
||||
+ (UIBarButtonItem *)searchBarButtonItemWithTarget:(id)target selector:(SEL)selector;
|
||||
+ (UIBarButtonItem *)backBarButtonItemWithTarget:(id)target selector:(SEL)selector;
|
||||
+ (UIBarButtonItem *)forwardBarButtonItemWithTarget:(id)target selector:(SEL)selector;
|
||||
@end
|
||||
@@ -7,32 +7,38 @@
|
||||
//
|
||||
|
||||
#import "PBFlatBarButtonItems.h"
|
||||
|
||||
#import "PBFlatButtonWithIcon.h"
|
||||
#import "PBBarButtonIconButton.h"
|
||||
|
||||
@implementation PBFlatBarButtonItems
|
||||
|
||||
+ (UIBarButtonItem *)barButtonItemWithIconType:(PBFlatIconType)iconType {
|
||||
UIBarButtonItem *_barButtonItem = [[UIBarButtonItem alloc] initWithCustomView:[[PBBarButtonIconView alloc] initWithFrame:CGRectMake(0, 0, 30, 30) andWithType:iconType]];
|
||||
+ (UIBarButtonItem *)barButtonItemWithIconType:(PBFlatIconType)iconType withTarget:(id)target selector:(SEL)selector {
|
||||
|
||||
PBBarButtonIconButton *button = [[PBBarButtonIconButton alloc] initWithFrame:CGRectMake(0, 0, 30, 30)];
|
||||
[button addTarget:target action:selector forControlEvents:UIControlEventTouchUpInside];
|
||||
[button setType:iconType];
|
||||
|
||||
UIBarButtonItem *_barButtonItem = [[UIBarButtonItem alloc] initWithCustomView:button];
|
||||
return _barButtonItem;
|
||||
}
|
||||
|
||||
+ (UIBarButtonItem *)addBarButtonItem {
|
||||
return [self barButtonItemWithIconType:PBFlatIconAdd];
|
||||
+ (UIBarButtonItem *)addBarButtonItemWithTarget:(id)target selector:(SEL)selector {
|
||||
return [self barButtonItemWithIconType:PBFlatIconAdd withTarget:target selector:selector];
|
||||
}
|
||||
+ (UIBarButtonItem *)moreBarButtonItem {
|
||||
return [self barButtonItemWithIconType:PBFlatIconMore];
|
||||
+ (UIBarButtonItem *)moreBarButtonItemWithTarget:(id)target selector:(SEL)selector {
|
||||
return [self barButtonItemWithIconType:PBFlatIconMore withTarget:target selector:selector];
|
||||
}
|
||||
+ (UIBarButtonItem *)menuBarButtonItem {
|
||||
return [self barButtonItemWithIconType:PBFlatIconMenu];
|
||||
+ (UIBarButtonItem *)menuBarButtonItemWithTarget:(id)target selector:(SEL)selector {
|
||||
return [self barButtonItemWithIconType:PBFlatIconMenu withTarget:target selector:selector];
|
||||
}
|
||||
+ (UIBarButtonItem *)searchBarButtonItem {
|
||||
return [self barButtonItemWithIconType:PBFlatIconSearch];
|
||||
+ (UIBarButtonItem *)searchBarButtonItemWithTarget:(id)target selector:(SEL)selector {
|
||||
return [self barButtonItemWithIconType:PBFlatIconSearch withTarget:target selector:selector];
|
||||
}
|
||||
+ (UIBarButtonItem *)backBarButtonItem {
|
||||
return [self barButtonItemWithIconType:PBFlatIconBack];
|
||||
+ (UIBarButtonItem *)backBarButtonItemWithTarget:(id)target selector:(SEL)selector {
|
||||
return [self barButtonItemWithIconType:PBFlatIconBack withTarget:target selector:selector];
|
||||
}
|
||||
+ (UIBarButtonItem *)forwardBarButtonItem {
|
||||
return [self barButtonItemWithIconType:PBFlatIconForward];
|
||||
+ (UIBarButtonItem *)forwardBarButtonItemWithTarget:(id)target selector:(SEL)selector {
|
||||
return [self barButtonItemWithIconType:PBFlatIconForward withTarget:target selector:selector];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
[self setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
|
||||
[self setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected];
|
||||
[self.titleLabel setFont:[[PBFlatSettings sharedInstance] font]];
|
||||
[self setImage:[PBIconDrawning iconImageWithSize:CGSizeMake(30, 30) withType:_type] forState:UIControlStateNormal];
|
||||
[self setImage:[PBIconDrawning iconImageWithSize:CGSizeMake(30, 30) withType:_type inverseColor:NO] forState:UIControlStateNormal];
|
||||
}
|
||||
|
||||
- (void)drawRect:(CGRect)rect
|
||||
|
||||
22
FlatUI/Classess/PBFlatGroupedStyleCell.h
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// PBFlatGroupedStyleCell.h
|
||||
// FlatUI
|
||||
//
|
||||
// Created by Piotr Bernad on 18.06.2013.
|
||||
// Copyright (c) 2013 Piotr Bernad. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "PBFlatSettings.h"
|
||||
|
||||
@interface PBFlatGroupedStyleCell : UITableViewCell {
|
||||
|
||||
UIImageView *_iconImageView;
|
||||
UIView *_cellAccessoryView;
|
||||
}
|
||||
- (void)setIconImage:(UIImage *)image;
|
||||
- (void)setCellAccessoryView:(UIView *)view;
|
||||
- (void)setLastCell:(BOOL)boolValue;
|
||||
- (void)setFirstCell:(BOOL)boolValue;
|
||||
- (void)setIconImageView:(UIImageView *)imageView;
|
||||
@end
|
||||
123
FlatUI/Classess/PBFlatGroupedStyleCell.m
Normal file
@@ -0,0 +1,123 @@
|
||||
//
|
||||
// PBFlatGroupedStyleCell.m
|
||||
// FlatUI
|
||||
//
|
||||
// Created by Piotr Bernad on 18.06.2013.
|
||||
// Copyright (c) 2013 Piotr Bernad. All rights reserved.
|
||||
//
|
||||
|
||||
#import "PBFlatGroupedStyleCell.h"
|
||||
#import "PBIconDrawning.h"
|
||||
|
||||
#define ICON_SIZE 30.0f
|
||||
#define MIN_PADDING 10.0f
|
||||
#define MAXIMUM_ACCESSORYVIEW_WIDTH 100.0f
|
||||
#define ACCESSORY_ICON_SIZE 20.0f
|
||||
|
||||
@implementation PBFlatGroupedStyleCell {
|
||||
BOOL _lastCell;
|
||||
BOOL _firstCell;
|
||||
}
|
||||
|
||||
-(void)awakeFromNib {
|
||||
|
||||
|
||||
_iconImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
|
||||
[self.contentView addSubview:_iconImageView];
|
||||
|
||||
[self.textLabel setFont:[[PBFlatSettings sharedInstance] font]];
|
||||
[self setBackgroundColor:[UIColor whiteColor]];
|
||||
[self setSelectionStyle:UITableViewCellSelectionStyleGray];
|
||||
|
||||
}
|
||||
-(void)layoutSubviews {
|
||||
[super layoutSubviews];
|
||||
|
||||
CGFloat _accesoryWidth = _cellAccessoryView ? CGRectGetWidth(_cellAccessoryView.frame) < MAXIMUM_ACCESSORYVIEW_WIDTH ? CGRectGetWidth(_cellAccessoryView.frame) : MAXIMUM_ACCESSORYVIEW_WIDTH : 0.0f;
|
||||
CGFloat _iconSize = _iconImageView.image ? ICON_SIZE + MIN_PADDING : 0.0f;
|
||||
|
||||
CGSize _textLabelSize = CGSizeMake(CGRectGetWidth(self.bounds) - _accesoryWidth - _iconSize, CGRectGetHeight(self.bounds));
|
||||
CGRect _textLabelRect = CGRectMake(MIN_PADDING + _iconSize, 0, _textLabelSize.width - 2 *MIN_PADDING, _textLabelSize.height);
|
||||
[self.textLabel setFrame:_textLabelRect];
|
||||
|
||||
CGRect _iconRect = CGRectMake(MIN_PADDING, 0, ICON_SIZE, ICON_SIZE);
|
||||
[_iconImageView setFrame:_iconRect];
|
||||
[_iconImageView setCenter:CGPointMake(20.0f, floorf(CGRectGetMidY(self.bounds)))];
|
||||
|
||||
|
||||
CGSize _accessorySize = CGSizeMake(_accesoryWidth, CGRectGetHeight(self.bounds));
|
||||
CGRect _accessoryRect = CGRectMake(CGRectGetWidth(self.bounds) - MIN_PADDING - _accesoryWidth, 0, _accessorySize.width, _accessorySize.height);
|
||||
[_cellAccessoryView setFrame:_accessoryRect];
|
||||
|
||||
|
||||
}
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
|
||||
{
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
- (void)drawRect:(CGRect)rect
|
||||
{
|
||||
CGRect bounds = self.bounds;
|
||||
UIBezierPath *path = [UIBezierPath bezierPathWithRect:bounds];
|
||||
|
||||
[[UIColor whiteColor] setFill];
|
||||
[path fill];
|
||||
|
||||
UIBezierPath *line = [UIBezierPath bezierPath];
|
||||
[line moveToPoint:CGPointMake(50.0f, CGRectGetMaxY(rect))];
|
||||
[line addLineToPoint:CGPointMake(CGRectGetMaxX(rect), CGRectGetMaxY(rect))];
|
||||
[[[PBFlatSettings sharedInstance] secondColor] setStroke];
|
||||
[line stroke];
|
||||
|
||||
if (_lastCell) {
|
||||
UIBezierPath *bottomline = [UIBezierPath bezierPath];
|
||||
[bottomline moveToPoint:CGPointMake(0.0f, CGRectGetMaxY(rect))];
|
||||
[bottomline addLineToPoint:CGPointMake(CGRectGetMaxX(rect), CGRectGetMaxY(rect))];
|
||||
[[[PBFlatSettings sharedInstance] textFieldPlaceHolderColor] setStroke];
|
||||
[bottomline stroke];
|
||||
}
|
||||
if (_firstCell) {
|
||||
UIBezierPath *bottomline = [UIBezierPath bezierPath];
|
||||
[bottomline moveToPoint:CGPointMake(0.0f, 0.0f)];
|
||||
[bottomline addLineToPoint:CGPointMake(CGRectGetMaxX(rect), 0.0f)];
|
||||
[[[PBFlatSettings sharedInstance] textFieldPlaceHolderColor] setStroke];
|
||||
[bottomline stroke];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (void)setIconImage:(UIImage *)image {
|
||||
[_iconImageView setImage:image];
|
||||
[_iconImageView setNeedsDisplay];
|
||||
[self setNeedsDisplay];
|
||||
}
|
||||
- (void)setCellAccessoryView:(UIView *)view {
|
||||
if(_cellAccessoryView) {
|
||||
[_cellAccessoryView removeFromSuperview];
|
||||
}
|
||||
_cellAccessoryView = view;
|
||||
[self addSubview:_cellAccessoryView];
|
||||
[self setNeedsDisplay];
|
||||
}
|
||||
|
||||
- (void)setLastCell:(BOOL)boolValue {
|
||||
_lastCell = boolValue;
|
||||
[self setNeedsDisplay];
|
||||
}
|
||||
- (void)setFirstCell:(BOOL)boolValue {
|
||||
_firstCell = boolValue;
|
||||
[self setNeedsDisplay];
|
||||
}
|
||||
- (void)setIconImageView:(UIImageView *)imageView {
|
||||
if(_iconImageView) {
|
||||
[_iconImageView removeFromSuperview];
|
||||
}
|
||||
_iconImageView = imageView;
|
||||
[self addSubview:_iconImageView];
|
||||
[self setNeedsDisplay];
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
15
FlatUI/Classess/PBFlatGroupedTableViewController.h
Normal file
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// PBFlatGroupedTableViewController.h
|
||||
// FlatUI
|
||||
//
|
||||
// Created by Piotr Bernad on 17.06.2013.
|
||||
// Copyright (c) 2013 Piotr Bernad. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "PBFlatBarButtonItems.h"
|
||||
#import "PBFlatGroupedStyleCell.h"
|
||||
|
||||
@interface PBFlatGroupedTableViewController : UITableViewController
|
||||
|
||||
@end
|
||||
81
FlatUI/Classess/PBFlatGroupedTableViewController.m
Normal file
@@ -0,0 +1,81 @@
|
||||
//
|
||||
// PBFlatGroupedTableViewController.m
|
||||
// FlatUI
|
||||
//
|
||||
// Created by Piotr Bernad on 17.06.2013.
|
||||
// Copyright (c) 2013 Piotr Bernad. All rights reserved.
|
||||
//
|
||||
|
||||
#import "PBFlatGroupedTableViewController.h"
|
||||
|
||||
@interface PBFlatGroupedTableViewController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation PBFlatGroupedTableViewController
|
||||
|
||||
-(void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
[self setBackBarItem];
|
||||
[self apperanceBackground];
|
||||
[self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
|
||||
}
|
||||
|
||||
- (void)setBackBarItem {
|
||||
// Override this method if needed
|
||||
UIBarButtonItem *back = [PBFlatBarButtonItems backBarButtonItemWithTarget:self selector:@selector(back:)];
|
||||
[back setTarget:self];
|
||||
[back setAction:@selector(backAction)];
|
||||
[self.navigationItem setLeftBarButtonItem:back];
|
||||
}
|
||||
|
||||
- (void)back:(UIBarButtonItem *)sender {
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
- (void)apperanceBackground {
|
||||
UIView *_backgroundview = [[UIView alloc] initWithFrame:self.view.bounds];
|
||||
[_backgroundview setBackgroundColor:[[PBFlatSettings sharedInstance] secondColor]];
|
||||
[self.tableView setBackgroundView:_backgroundview];
|
||||
}
|
||||
|
||||
#pragma mark -TableView Delagate & Data Source
|
||||
|
||||
- (PBFlatGroupedStyleCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
static NSString *cellID = @"Cell";
|
||||
PBFlatGroupedStyleCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
|
||||
if (cell==nil) {
|
||||
cell = [[PBFlatGroupedStyleCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellID];
|
||||
}
|
||||
[cell setFirstCell:NO];
|
||||
[cell setLastCell:NO];
|
||||
|
||||
if(indexPath.row == 0) {
|
||||
[cell setFirstCell:YES];
|
||||
} else if (indexPath.row == [self.tableView numberOfRowsInSection:indexPath.section] - 1) {
|
||||
[cell setLastCell:YES];
|
||||
}
|
||||
[self configureCell:cell forIndexPath:indexPath];
|
||||
|
||||
return cell;
|
||||
}
|
||||
- (void)configureCell:(UITableViewCell *)cell forIndexPath:(NSIndexPath *)indexPath {
|
||||
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
|
||||
return 30.0f;
|
||||
}
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
|
||||
UIView *__view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), 30.0f)];
|
||||
[__view setBackgroundColor:[UIColor clearColor]];
|
||||
return __view;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -9,5 +9,5 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface PBFlatRoundedImageView : UIImageView
|
||||
|
||||
+ (PBFlatRoundedImageView *)contactImageViewWithImage:(UIImage *)image;
|
||||
@end
|
||||
|
||||
@@ -13,9 +13,21 @@
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
self.layer.cornerRadius = 50.0f;
|
||||
self.layer.borderColor = [[PBFlatSettings sharedInstance] mainColor].CGColor;
|
||||
self.layer.borderWidth = 1.0f;
|
||||
self.layer.masksToBounds = YES;
|
||||
}
|
||||
|
||||
-(void)layoutSubviews {
|
||||
[super layoutSubviews];
|
||||
self.layer.cornerRadius = CGRectGetWidth(self.bounds)/2.0f;
|
||||
}
|
||||
|
||||
+ (PBFlatRoundedImageView *)contactImageViewWithImage:(UIImage *)image {
|
||||
PBFlatRoundedImageView *imageView = [[PBFlatRoundedImageView alloc] initWithImage:image];
|
||||
imageView.layer.masksToBounds = YES;
|
||||
return imageView;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -11,9 +11,12 @@
|
||||
#import "UIImage+Additions.h"
|
||||
|
||||
@interface PBFlatSettings : NSObject
|
||||
@property (strong, readwrite) UIColor *iconImageColor;
|
||||
|
||||
@property (strong, readwrite) UIColor *mainColor;
|
||||
@property (strong, readwrite) UIColor *secondColor;
|
||||
@property (strong, readwrite) UIColor *backgroundColor;
|
||||
|
||||
@property (strong, readwrite) UIColor *iconImageColor;
|
||||
@property (strong, readwrite) UIColor *textFieldPlaceHolderColor;
|
||||
@property (strong, readwrite) UIFont *font;
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
_mainColor = [UIColor colorWithRed:0.35f green:0.51f blue:0.91f alpha:1.00f];
|
||||
_backgroundColor = [UIColor whiteColor];
|
||||
_textFieldPlaceHolderColor = [UIColor colorWithRed:0.80f green:0.80f blue:0.80f alpha:1.00f];
|
||||
_secondColor = [UIColor colorWithRed:0.94f green:0.94f blue:0.94f alpha:1.00f];
|
||||
_font = [UIFont fontWithName:@"HelveticaNeue-Light" size:15];
|
||||
_iconImageColor = [UIColor whiteColor];
|
||||
}
|
||||
|
||||
@@ -18,5 +18,5 @@ typedef enum {
|
||||
|
||||
@interface PBIconDrawning : NSObject
|
||||
+ (void)drawIconInRect:(CGRect)rect withType:(PBFlatIconType)type color:(UIColor *)color;
|
||||
+ (UIImage *)iconImageWithSize:(CGSize)size withType:(PBFlatIconType)type;
|
||||
+ (UIImage *)iconImageWithSize:(CGSize)size withType:(PBFlatIconType)type inverseColor:(BOOL)inverse;
|
||||
@end
|
||||
|
||||
@@ -38,11 +38,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ (UIImage *)iconImageWithSize:(CGSize)size withType:(PBFlatIconType)type {
|
||||
+ (UIImage *)iconImageWithSize:(CGSize)size withType:(PBFlatIconType)type inverseColor:(BOOL)inverse {
|
||||
CGRect rect = CGRectMake(0.0f, 0.0f, size.width, size.height);
|
||||
UIGraphicsBeginImageContextWithOptions(rect.size, NO, 0);
|
||||
|
||||
[self drawIconInRect:rect withType:type color:[[PBFlatSettings sharedInstance] iconImageColor]];
|
||||
[self drawIconInRect:rect withType:type color: inverse ? [[PBFlatSettings sharedInstance] mainColor] :[[PBFlatSettings sharedInstance] iconImageColor]];
|
||||
|
||||
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
|
||||
UIGraphicsEndImageContext();
|
||||
|
||||
@@ -153,12 +153,50 @@
|
||||
<outlet property="menu" destination="fIA-YW-t8y" id="Xjs-sb-qZQ"/>
|
||||
<outlet property="search" destination="3JG-Cv-lav" id="A0R-xT-keb"/>
|
||||
<outlet property="textField" destination="M3l-k6-OeP" id="OSh-OV-mia"/>
|
||||
<segue destination="nRU-LO-n4t" kind="push" identifier="leftMenu" id="t4E-bF-t89"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="MKh-v9-pgX" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="518" y="-132"/>
|
||||
</scene>
|
||||
<!--Example TableVC-->
|
||||
<scene sceneID="cSy-tg-gBs">
|
||||
<objects>
|
||||
<tableViewController id="nRU-LO-n4t" customClass="PBExampleTableVC" sceneMemberID="viewController">
|
||||
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="er4-q2-4u2">
|
||||
<rect key="frame" x="0.0" y="64" width="320" height="504"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<prototypes>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="h5x-Sm-wT6" style="IBUITableViewCellStyleDefault" id="OPa-nd-cb2" customClass="PBFlatGroupedStyleCell">
|
||||
<rect key="frame" x="0.0" y="22" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="h5x-Sm-wT6">
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="nRU-LO-n4t" id="4h9-7x-5TU"/>
|
||||
<outlet property="delegate" destination="nRU-LO-n4t" id="wtH-6C-MEr"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<navigationItem key="navigationItem" id="gYL-LK-v44"/>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="sP1-wK-cUD" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="1012" y="-109"/>
|
||||
</scene>
|
||||
<!--Navigation Controller-->
|
||||
<scene sceneID="5QE-2k-gBG">
|
||||
<objects>
|
||||
@@ -185,12 +223,21 @@
|
||||
<class className="NSLayoutConstraint" superclassName="NSObject">
|
||||
<source key="sourceIdentifier" type="project" relativePath="./Classes/NSLayoutConstraint.h"/>
|
||||
</class>
|
||||
<class className="PBExampleTableVC" superclassName="PBFlatGroupedTableViewController">
|
||||
<source key="sourceIdentifier" type="project" relativePath="./Classes/PBExampleTableVC.h"/>
|
||||
</class>
|
||||
<class className="PBFlatButton" superclassName="UIButton">
|
||||
<source key="sourceIdentifier" type="project" relativePath="./Classes/PBFlatButton.h"/>
|
||||
</class>
|
||||
<class className="PBFlatButtonWithIcon" superclassName="UIButton">
|
||||
<source key="sourceIdentifier" type="project" relativePath="./Classes/PBFlatButtonWithIcon.h"/>
|
||||
</class>
|
||||
<class className="PBFlatGroupedStyleCell" superclassName="UITableViewCell">
|
||||
<source key="sourceIdentifier" type="project" relativePath="./Classes/PBFlatGroupedStyleCell.h"/>
|
||||
</class>
|
||||
<class className="PBFlatGroupedTableViewController" superclassName="UITableViewController">
|
||||
<source key="sourceIdentifier" type="project" relativePath="./Classes/PBFlatGroupedTableViewController.h"/>
|
||||
</class>
|
||||
<class className="PBFlatRoundedImageView" superclassName="UIImageView">
|
||||
<source key="sourceIdentifier" type="project" relativePath="./Classes/PBFlatRoundedImageView.h"/>
|
||||
</class>
|
||||
|
||||
13
FlatUI/PBExampleTableVC.h
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// PBExampleTableVC.h
|
||||
// FlatUI
|
||||
//
|
||||
// Created by Piotr Bernad on 17.06.2013.
|
||||
// Copyright (c) 2013 Piotr Bernad. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "PBFlatGroupedTableViewController.h"
|
||||
@interface PBExampleTableVC : PBFlatGroupedTableViewController
|
||||
|
||||
@end
|
||||
125
FlatUI/PBExampleTableVC.m
Normal file
@@ -0,0 +1,125 @@
|
||||
//
|
||||
// PBExampleTableVC.m
|
||||
// FlatUI
|
||||
//
|
||||
// Created by Piotr Bernad on 17.06.2013.
|
||||
// Copyright (c) 2013 Piotr Bernad. All rights reserved.
|
||||
//
|
||||
|
||||
#import "PBExampleTableVC.h"
|
||||
#import "PBFlatSettings.h"
|
||||
#import "PBIconDrawning.h"
|
||||
#import "PBFlatRoundedImageView.h"
|
||||
|
||||
@implementation PBExampleTableVC
|
||||
-(void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
[self setTitle:@"Settings"];
|
||||
}
|
||||
|
||||
-(void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
}
|
||||
|
||||
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
return 3;
|
||||
}
|
||||
|
||||
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return 3;
|
||||
}
|
||||
|
||||
-(void)configureCell:(PBFlatGroupedStyleCell *)cell forIndexPath:(NSIndexPath *)indexPath {
|
||||
double section = indexPath.section;
|
||||
NSInteger index = 3*section + indexPath.row;
|
||||
|
||||
[cell.textLabel setText:[[self exampleTitles] objectAtIndex:index]];
|
||||
|
||||
|
||||
|
||||
[cell setIconImage:[[self exampleIcons] objectAtIndex:index]];
|
||||
[cell setCellAccessoryView:[self exampleAccessoryViewForIndexPath:indexPath]];
|
||||
|
||||
if (section == 2) {
|
||||
|
||||
switch (indexPath.row) {
|
||||
case 0: {
|
||||
[cell setIconImageView:[PBFlatRoundedImageView contactImageViewWithImage:[UIImage imageNamed:@"js"]]];
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
|
||||
[cell setIconImageView:[PBFlatRoundedImageView contactImageViewWithImage:[UIImage imageNamed:@"tl"]]];
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
|
||||
[cell setIconImageView:[PBFlatRoundedImageView contactImageViewWithImage:[UIImage imageNamed:@"cn"]]];
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
-(NSArray *)exampleTitles {
|
||||
return @[@"Airplane Mode",
|
||||
@"Wi-Fi",
|
||||
@"Bluetooth",
|
||||
@"NotificationCenter",
|
||||
@"Control Center",
|
||||
@"Do Not Disturb",
|
||||
@"Jon Snow",
|
||||
@"Tyrion Lannister",
|
||||
@"Chuck Norris"];
|
||||
}
|
||||
-(NSArray *)exampleIcons {
|
||||
return @[[UIImage imageNamed:@"airplane"],
|
||||
[UIImage imageNamed:@"wifi"],
|
||||
[UIImage imageNamed:@"bluetooth"],
|
||||
[UIImage imageNamed:@"notification"],
|
||||
[UIImage imageNamed:@"block"],
|
||||
[UIImage imageNamed:@"donotdisturb"],
|
||||
[UIImage imageNamed:@"general"],
|
||||
[UIImage imageNamed:@"sounds"],
|
||||
[UIImage imageNamed:@"brightness"]];
|
||||
}
|
||||
|
||||
- (UIView *)exampleAccessoryViewForIndexPath:(NSIndexPath *)indexPath {
|
||||
|
||||
UILabel *label = [[UILabel alloc] initWithFrame:CGRectZero];
|
||||
[label setTextColor:[UIColor darkGrayColor]];
|
||||
[label setFont:[[[PBFlatSettings sharedInstance] font] fontWithSize:12.0f]];
|
||||
[label setBackgroundColor:[UIColor clearColor]];
|
||||
|
||||
switch (indexPath.section) {
|
||||
case 1:
|
||||
{
|
||||
if(indexPath.row == 1) {
|
||||
[label setText:@"On"];
|
||||
} else {
|
||||
[label setText:@"Off"];
|
||||
}
|
||||
[label setFrame:[label textRectForBounds:CGRectMake(0, 0, 90, 45) limitedToNumberOfLines:1]];
|
||||
break;
|
||||
}
|
||||
case 2:{
|
||||
[label setText:@"iPhone"];
|
||||
if(indexPath.row == 1) {
|
||||
[label setText:@"Home"];
|
||||
}
|
||||
[label setFrame:[label textRectForBounds:CGRectMake(0, 0, 90, 45) limitedToNumberOfLines:1]];
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
[label setText:@"Additional"];
|
||||
[label setFrame:[label textRectForBounds:CGRectMake(0, 0, 90, 45) limitedToNumberOfLines:1]];
|
||||
break;
|
||||
}
|
||||
}
|
||||
return label;
|
||||
}
|
||||
@end
|
||||
@@ -19,8 +19,9 @@
|
||||
[super viewDidLoad];
|
||||
[self.view setBackgroundColor:[UIColor colorWithRed:0.97f green:0.97f blue:0.97f alpha:1.00f]];
|
||||
|
||||
[self.navigationItem setRightBarButtonItem:[PBFlatBarButtonItems addBarButtonItem]];
|
||||
[self.navigationItem setLeftBarButtonItem:[PBFlatBarButtonItems moreBarButtonItem]];
|
||||
[self.navigationItem setRightBarButtonItem:[PBFlatBarButtonItems addBarButtonItemWithTarget:nil selector:nil]];
|
||||
[self.navigationItem setLeftBarButtonItem:[PBFlatBarButtonItems moreBarButtonItemWithTarget:self selector:@selector(showLeftMenu:)]];
|
||||
|
||||
|
||||
[_textField setDelegate:self];
|
||||
|
||||
@@ -31,6 +32,10 @@
|
||||
|
||||
}
|
||||
|
||||
-(void)showLeftMenu:(UIBarButtonItem *)sender {
|
||||
[self performSegueWithIdentifier:@"leftMenu" sender:sender];
|
||||
}
|
||||
|
||||
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
|
||||
[textField resignFirstResponder];
|
||||
return YES;
|
||||
|
||||
BIN
FlatUI/icons/airplane.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
FlatUI/icons/airplane@2x.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
FlatUI/icons/block.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
FlatUI/icons/block@2x.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
FlatUI/icons/bluetooth.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
FlatUI/icons/bluetooth@2x.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
FlatUI/icons/brightness.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
FlatUI/icons/brightness@2x.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
FlatUI/icons/cn.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
FlatUI/icons/donotdisturb.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
FlatUI/icons/donotdisturb@2x.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
FlatUI/icons/general.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
FlatUI/icons/general@2x.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
FlatUI/icons/gsm.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
FlatUI/icons/gsm@2x.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
FlatUI/icons/hotspot.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
FlatUI/icons/hotspot@2x.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
FlatUI/icons/i_icon.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
FlatUI/icons/i_icon@2x.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
FlatUI/icons/js.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
FlatUI/icons/notification.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
FlatUI/icons/notification@2x.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
FlatUI/icons/sounds.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
FlatUI/icons/sounds@2x.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
FlatUI/icons/tl.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
FlatUI/icons/wifi.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
FlatUI/icons/wifi@2x.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'PBFlatUI'
|
||||
s.version = '1.0.0'
|
||||
s.version = '1.1.0'
|
||||
s.requires_arc = true
|
||||
s.author = {
|
||||
'Piotr Bernad' => 'piotrbernadd@gmail.com'
|
||||
|
||||
10
README.md
@@ -8,7 +8,7 @@ Easy to use User Interface elements which are really similar to design in iOS 7.
|
||||
|
||||
To install FlatUI cocoapods need to be configured. To add to your project FlatUI edit podfile file and append the following line:
|
||||
|
||||
> pod 'PBFlatUI', '~> 1.0.0'
|
||||
> pod 'PBFlatUI', '~> 1.1.0'
|
||||
|
||||
## Customization
|
||||
|
||||
@@ -16,6 +16,8 @@ The main customization class is PBFlatSettings, where you can change colors, fon
|
||||
|
||||
## Examples
|
||||
|
||||
<img src="http://piotrbernad.pl/FlatUI/flatGreen.png" alt="Drawing" style="width: 200px;"/>
|
||||
<img src="http://piotrbernad.pl/FlatUI/flatBlue.png" alt="Drawing" style="width: 200px;"/>
|
||||
<img src="http://piotrbernad.pl/FlatUI/flatOrange.png" alt="Drawing" style="width: 200px;"/>
|
||||
<img src="http://piotrbernad.pl/FlatUI/flatGreen.png" width=200 alt="Drawing" style="width: 200px;"/>
|
||||
<img src="http://piotrbernad.pl/FlatUI/flatTable.png" width=200 alt="Drawing" style="width: 200px;"/>
|
||||
<img src="http://piotrbernad.pl/FlatUI/flatBlue.png" width=200 alt="Drawing" style="width: 200px;"/>
|
||||
<img src="http://piotrbernad.pl/FlatUI/flatOrange.png" width=200 alt="Drawing" style="width: 200px;"/>
|
||||
|
||||
|
||||