├── README.md └── 个人详情控制器 ├── 个人详情控制器.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── yuanzheng.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── yuanzheng.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── xcschememanagement.plist │ └── 个人详情控制器.xcscheme ├── 个人详情控制器 ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ └── LaunchScreen.xib ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── lol.imageset │ │ ├── Contents.json │ │ └── lol.jpg │ └── timo.imageset │ │ ├── Contents.json │ │ └── timo.jpg ├── Info.plist ├── XMGPersonTableViewController.h ├── XMGPersonTableViewController.m ├── XMGPersonViewController.h ├── XMGPersonViewController.m ├── YZPerson │ ├── Category │ │ ├── UIImage+Image.h │ │ └── UIImage+Image.m │ ├── YZPersonTableViewController.h │ ├── YZPersonTableViewController.m │ ├── YZPersonViewController.h │ ├── YZPersonViewController.m │ ├── YZPersonViewController.xib │ ├── YZTableView.h │ └── YZTableView.m ├── YZWeiBoTableViewController.h ├── YZWeiBoTableViewController.m └── main.m └── 个人详情控制器Tests ├── Info.plist └── _______Tests.m /README.md: -------------------------------------------------------------------------------- 1 | # PersonalFramework 2 | # 框架使用详情可参考blog http://www.jianshu.com/p/e9fb9114b84c 3 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | EC6012AC1B7CBC0800F04FBD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = EC6012AB1B7CBC0800F04FBD /* main.m */; }; 11 | EC6012AF1B7CBC0800F04FBD /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = EC6012AE1B7CBC0800F04FBD /* AppDelegate.m */; }; 12 | EC6012B71B7CBC0800F04FBD /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EC6012B61B7CBC0800F04FBD /* Images.xcassets */; }; 13 | EC6012BA1B7CBC0800F04FBD /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC6012B81B7CBC0800F04FBD /* LaunchScreen.xib */; }; 14 | EC6012C61B7CBC0800F04FBD /* _______Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = EC6012C51B7CBC0800F04FBD /* _______Tests.m */; }; 15 | EC6012E31B7CC85B00F04FBD /* YZPersonTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EC6012DE1B7CC85B00F04FBD /* YZPersonTableViewController.m */; }; 16 | EC6012E41B7CC85B00F04FBD /* YZPersonViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EC6012E01B7CC85B00F04FBD /* YZPersonViewController.m */; }; 17 | EC6012E51B7CC85B00F04FBD /* YZPersonViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC6012E11B7CC85B00F04FBD /* YZPersonViewController.xib */; }; 18 | EC6012F11B7CD1ED00F04FBD /* YZTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = EC6012F01B7CD1ED00F04FBD /* YZTableView.m */; }; 19 | EC6013291B7CD96300F04FBD /* XMGPersonViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EC6013281B7CD96300F04FBD /* XMGPersonViewController.m */; }; 20 | EC60132C1B7CD9AE00F04FBD /* XMGPersonTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EC60132B1B7CD9AE00F04FBD /* XMGPersonTableViewController.m */; }; 21 | EC60132F1B7CDAFA00F04FBD /* YZWeiBoTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EC60132E1B7CDAFA00F04FBD /* YZWeiBoTableViewController.m */; }; 22 | EC6013331B7CDFC500F04FBD /* UIImage+Image.m in Sources */ = {isa = PBXBuildFile; fileRef = EC6013321B7CDFC500F04FBD /* UIImage+Image.m */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXContainerItemProxy section */ 26 | EC6012C01B7CBC0800F04FBD /* PBXContainerItemProxy */ = { 27 | isa = PBXContainerItemProxy; 28 | containerPortal = EC60129E1B7CBC0800F04FBD /* Project object */; 29 | proxyType = 1; 30 | remoteGlobalIDString = EC6012A51B7CBC0800F04FBD; 31 | remoteInfo = "个人详情控制器"; 32 | }; 33 | /* End PBXContainerItemProxy section */ 34 | 35 | /* Begin PBXFileReference section */ 36 | EC6012A61B7CBC0800F04FBD /* 个人详情控制器.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "个人详情控制器.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 37 | EC6012AA1B7CBC0800F04FBD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 38 | EC6012AB1B7CBC0800F04FBD /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 39 | EC6012AD1B7CBC0800F04FBD /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 40 | EC6012AE1B7CBC0800F04FBD /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 41 | EC6012B61B7CBC0800F04FBD /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 42 | EC6012B91B7CBC0800F04FBD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 43 | EC6012BF1B7CBC0800F04FBD /* 个人详情控制器Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "个人详情控制器Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | EC6012C41B7CBC0800F04FBD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | EC6012C51B7CBC0800F04FBD /* _______Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "_______Tests.m"; sourceTree = ""; }; 46 | EC6012DD1B7CC85B00F04FBD /* YZPersonTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YZPersonTableViewController.h; sourceTree = ""; }; 47 | EC6012DE1B7CC85B00F04FBD /* YZPersonTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YZPersonTableViewController.m; sourceTree = ""; }; 48 | EC6012DF1B7CC85B00F04FBD /* YZPersonViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YZPersonViewController.h; sourceTree = ""; }; 49 | EC6012E01B7CC85B00F04FBD /* YZPersonViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YZPersonViewController.m; sourceTree = ""; }; 50 | EC6012E11B7CC85B00F04FBD /* YZPersonViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = YZPersonViewController.xib; sourceTree = ""; }; 51 | EC6012EF1B7CD1ED00F04FBD /* YZTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YZTableView.h; sourceTree = ""; }; 52 | EC6012F01B7CD1ED00F04FBD /* YZTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YZTableView.m; sourceTree = ""; }; 53 | EC6013271B7CD96300F04FBD /* XMGPersonViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMGPersonViewController.h; sourceTree = ""; }; 54 | EC6013281B7CD96300F04FBD /* XMGPersonViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XMGPersonViewController.m; sourceTree = ""; }; 55 | EC60132A1B7CD9AE00F04FBD /* XMGPersonTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMGPersonTableViewController.h; sourceTree = ""; }; 56 | EC60132B1B7CD9AE00F04FBD /* XMGPersonTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XMGPersonTableViewController.m; sourceTree = ""; }; 57 | EC60132D1B7CDAFA00F04FBD /* YZWeiBoTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YZWeiBoTableViewController.h; sourceTree = ""; }; 58 | EC60132E1B7CDAFA00F04FBD /* YZWeiBoTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YZWeiBoTableViewController.m; sourceTree = ""; }; 59 | EC6013311B7CDFC500F04FBD /* UIImage+Image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+Image.h"; sourceTree = ""; }; 60 | EC6013321B7CDFC500F04FBD /* UIImage+Image.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+Image.m"; sourceTree = ""; }; 61 | /* End PBXFileReference section */ 62 | 63 | /* Begin PBXFrameworksBuildPhase section */ 64 | EC6012A31B7CBC0800F04FBD /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | EC6012BC1B7CBC0800F04FBD /* Frameworks */ = { 72 | isa = PBXFrameworksBuildPhase; 73 | buildActionMask = 2147483647; 74 | files = ( 75 | ); 76 | runOnlyForDeploymentPostprocessing = 0; 77 | }; 78 | /* End PBXFrameworksBuildPhase section */ 79 | 80 | /* Begin PBXGroup section */ 81 | EC60129D1B7CBC0800F04FBD = { 82 | isa = PBXGroup; 83 | children = ( 84 | EC6012A81B7CBC0800F04FBD /* 个人详情控制器 */, 85 | EC6012C21B7CBC0800F04FBD /* 个人详情控制器Tests */, 86 | EC6012A71B7CBC0800F04FBD /* Products */, 87 | ); 88 | sourceTree = ""; 89 | }; 90 | EC6012A71B7CBC0800F04FBD /* Products */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | EC6012A61B7CBC0800F04FBD /* 个人详情控制器.app */, 94 | EC6012BF1B7CBC0800F04FBD /* 个人详情控制器Tests.xctest */, 95 | ); 96 | name = Products; 97 | sourceTree = ""; 98 | }; 99 | EC6012A81B7CBC0800F04FBD /* 个人详情控制器 */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | EC6012DA1B7CC85B00F04FBD /* YZPerson */, 103 | EC6012AD1B7CBC0800F04FBD /* AppDelegate.h */, 104 | EC6012AE1B7CBC0800F04FBD /* AppDelegate.m */, 105 | EC6012B61B7CBC0800F04FBD /* Images.xcassets */, 106 | EC6012B81B7CBC0800F04FBD /* LaunchScreen.xib */, 107 | EC6012A91B7CBC0800F04FBD /* Supporting Files */, 108 | EC6013271B7CD96300F04FBD /* XMGPersonViewController.h */, 109 | EC6013281B7CD96300F04FBD /* XMGPersonViewController.m */, 110 | EC60132A1B7CD9AE00F04FBD /* XMGPersonTableViewController.h */, 111 | EC60132B1B7CD9AE00F04FBD /* XMGPersonTableViewController.m */, 112 | EC60132D1B7CDAFA00F04FBD /* YZWeiBoTableViewController.h */, 113 | EC60132E1B7CDAFA00F04FBD /* YZWeiBoTableViewController.m */, 114 | ); 115 | path = "个人详情控制器"; 116 | sourceTree = ""; 117 | }; 118 | EC6012A91B7CBC0800F04FBD /* Supporting Files */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | EC6012AA1B7CBC0800F04FBD /* Info.plist */, 122 | EC6012AB1B7CBC0800F04FBD /* main.m */, 123 | ); 124 | name = "Supporting Files"; 125 | sourceTree = ""; 126 | }; 127 | EC6012C21B7CBC0800F04FBD /* 个人详情控制器Tests */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | EC6012C51B7CBC0800F04FBD /* _______Tests.m */, 131 | EC6012C31B7CBC0800F04FBD /* Supporting Files */, 132 | ); 133 | path = "个人详情控制器Tests"; 134 | sourceTree = ""; 135 | }; 136 | EC6012C31B7CBC0800F04FBD /* Supporting Files */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | EC6012C41B7CBC0800F04FBD /* Info.plist */, 140 | ); 141 | name = "Supporting Files"; 142 | sourceTree = ""; 143 | }; 144 | EC6012DA1B7CC85B00F04FBD /* YZPerson */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | EC6013301B7CDFC500F04FBD /* Category */, 148 | EC6012DD1B7CC85B00F04FBD /* YZPersonTableViewController.h */, 149 | EC6012DE1B7CC85B00F04FBD /* YZPersonTableViewController.m */, 150 | EC6012DF1B7CC85B00F04FBD /* YZPersonViewController.h */, 151 | EC6012E01B7CC85B00F04FBD /* YZPersonViewController.m */, 152 | EC6012E11B7CC85B00F04FBD /* YZPersonViewController.xib */, 153 | EC6012EF1B7CD1ED00F04FBD /* YZTableView.h */, 154 | EC6012F01B7CD1ED00F04FBD /* YZTableView.m */, 155 | ); 156 | path = YZPerson; 157 | sourceTree = ""; 158 | }; 159 | EC6013301B7CDFC500F04FBD /* Category */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | EC6013311B7CDFC500F04FBD /* UIImage+Image.h */, 163 | EC6013321B7CDFC500F04FBD /* UIImage+Image.m */, 164 | ); 165 | path = Category; 166 | sourceTree = ""; 167 | }; 168 | /* End PBXGroup section */ 169 | 170 | /* Begin PBXNativeTarget section */ 171 | EC6012A51B7CBC0800F04FBD /* 个人详情控制器 */ = { 172 | isa = PBXNativeTarget; 173 | buildConfigurationList = EC6012C91B7CBC0800F04FBD /* Build configuration list for PBXNativeTarget "个人详情控制器" */; 174 | buildPhases = ( 175 | EC6012A21B7CBC0800F04FBD /* Sources */, 176 | EC6012A31B7CBC0800F04FBD /* Frameworks */, 177 | EC6012A41B7CBC0800F04FBD /* Resources */, 178 | ); 179 | buildRules = ( 180 | ); 181 | dependencies = ( 182 | ); 183 | name = "个人详情控制器"; 184 | productName = "个人详情控制器"; 185 | productReference = EC6012A61B7CBC0800F04FBD /* 个人详情控制器.app */; 186 | productType = "com.apple.product-type.application"; 187 | }; 188 | EC6012BE1B7CBC0800F04FBD /* 个人详情控制器Tests */ = { 189 | isa = PBXNativeTarget; 190 | buildConfigurationList = EC6012CC1B7CBC0800F04FBD /* Build configuration list for PBXNativeTarget "个人详情控制器Tests" */; 191 | buildPhases = ( 192 | EC6012BB1B7CBC0800F04FBD /* Sources */, 193 | EC6012BC1B7CBC0800F04FBD /* Frameworks */, 194 | EC6012BD1B7CBC0800F04FBD /* Resources */, 195 | ); 196 | buildRules = ( 197 | ); 198 | dependencies = ( 199 | EC6012C11B7CBC0800F04FBD /* PBXTargetDependency */, 200 | ); 201 | name = "个人详情控制器Tests"; 202 | productName = "个人详情控制器Tests"; 203 | productReference = EC6012BF1B7CBC0800F04FBD /* 个人详情控制器Tests.xctest */; 204 | productType = "com.apple.product-type.bundle.unit-test"; 205 | }; 206 | /* End PBXNativeTarget section */ 207 | 208 | /* Begin PBXProject section */ 209 | EC60129E1B7CBC0800F04FBD /* Project object */ = { 210 | isa = PBXProject; 211 | attributes = { 212 | CLASSPREFIX = YZ; 213 | LastUpgradeCheck = 0640; 214 | ORGANIZATIONNAME = yz; 215 | TargetAttributes = { 216 | EC6012A51B7CBC0800F04FBD = { 217 | CreatedOnToolsVersion = 6.4; 218 | }; 219 | EC6012BE1B7CBC0800F04FBD = { 220 | CreatedOnToolsVersion = 6.4; 221 | TestTargetID = EC6012A51B7CBC0800F04FBD; 222 | }; 223 | }; 224 | }; 225 | buildConfigurationList = EC6012A11B7CBC0800F04FBD /* Build configuration list for PBXProject "个人详情控制器" */; 226 | compatibilityVersion = "Xcode 3.2"; 227 | developmentRegion = English; 228 | hasScannedForEncodings = 0; 229 | knownRegions = ( 230 | en, 231 | Base, 232 | ); 233 | mainGroup = EC60129D1B7CBC0800F04FBD; 234 | productRefGroup = EC6012A71B7CBC0800F04FBD /* Products */; 235 | projectDirPath = ""; 236 | projectRoot = ""; 237 | targets = ( 238 | EC6012A51B7CBC0800F04FBD /* 个人详情控制器 */, 239 | EC6012BE1B7CBC0800F04FBD /* 个人详情控制器Tests */, 240 | ); 241 | }; 242 | /* End PBXProject section */ 243 | 244 | /* Begin PBXResourcesBuildPhase section */ 245 | EC6012A41B7CBC0800F04FBD /* Resources */ = { 246 | isa = PBXResourcesBuildPhase; 247 | buildActionMask = 2147483647; 248 | files = ( 249 | EC6012E51B7CC85B00F04FBD /* YZPersonViewController.xib in Resources */, 250 | EC6012BA1B7CBC0800F04FBD /* LaunchScreen.xib in Resources */, 251 | EC6012B71B7CBC0800F04FBD /* Images.xcassets in Resources */, 252 | ); 253 | runOnlyForDeploymentPostprocessing = 0; 254 | }; 255 | EC6012BD1B7CBC0800F04FBD /* Resources */ = { 256 | isa = PBXResourcesBuildPhase; 257 | buildActionMask = 2147483647; 258 | files = ( 259 | ); 260 | runOnlyForDeploymentPostprocessing = 0; 261 | }; 262 | /* End PBXResourcesBuildPhase section */ 263 | 264 | /* Begin PBXSourcesBuildPhase section */ 265 | EC6012A21B7CBC0800F04FBD /* Sources */ = { 266 | isa = PBXSourcesBuildPhase; 267 | buildActionMask = 2147483647; 268 | files = ( 269 | EC6012AF1B7CBC0800F04FBD /* AppDelegate.m in Sources */, 270 | EC6012E31B7CC85B00F04FBD /* YZPersonTableViewController.m in Sources */, 271 | EC6012AC1B7CBC0800F04FBD /* main.m in Sources */, 272 | EC6013331B7CDFC500F04FBD /* UIImage+Image.m in Sources */, 273 | EC6012F11B7CD1ED00F04FBD /* YZTableView.m in Sources */, 274 | EC6013291B7CD96300F04FBD /* XMGPersonViewController.m in Sources */, 275 | EC60132C1B7CD9AE00F04FBD /* XMGPersonTableViewController.m in Sources */, 276 | EC6012E41B7CC85B00F04FBD /* YZPersonViewController.m in Sources */, 277 | EC60132F1B7CDAFA00F04FBD /* YZWeiBoTableViewController.m in Sources */, 278 | ); 279 | runOnlyForDeploymentPostprocessing = 0; 280 | }; 281 | EC6012BB1B7CBC0800F04FBD /* Sources */ = { 282 | isa = PBXSourcesBuildPhase; 283 | buildActionMask = 2147483647; 284 | files = ( 285 | EC6012C61B7CBC0800F04FBD /* _______Tests.m in Sources */, 286 | ); 287 | runOnlyForDeploymentPostprocessing = 0; 288 | }; 289 | /* End PBXSourcesBuildPhase section */ 290 | 291 | /* Begin PBXTargetDependency section */ 292 | EC6012C11B7CBC0800F04FBD /* PBXTargetDependency */ = { 293 | isa = PBXTargetDependency; 294 | target = EC6012A51B7CBC0800F04FBD /* 个人详情控制器 */; 295 | targetProxy = EC6012C01B7CBC0800F04FBD /* PBXContainerItemProxy */; 296 | }; 297 | /* End PBXTargetDependency section */ 298 | 299 | /* Begin PBXVariantGroup section */ 300 | EC6012B81B7CBC0800F04FBD /* LaunchScreen.xib */ = { 301 | isa = PBXVariantGroup; 302 | children = ( 303 | EC6012B91B7CBC0800F04FBD /* Base */, 304 | ); 305 | name = LaunchScreen.xib; 306 | sourceTree = ""; 307 | }; 308 | /* End PBXVariantGroup section */ 309 | 310 | /* Begin XCBuildConfiguration section */ 311 | EC6012C71B7CBC0800F04FBD /* Debug */ = { 312 | isa = XCBuildConfiguration; 313 | buildSettings = { 314 | ALWAYS_SEARCH_USER_PATHS = NO; 315 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 316 | CLANG_CXX_LIBRARY = "libc++"; 317 | CLANG_ENABLE_MODULES = YES; 318 | CLANG_ENABLE_OBJC_ARC = YES; 319 | CLANG_WARN_BOOL_CONVERSION = YES; 320 | CLANG_WARN_CONSTANT_CONVERSION = YES; 321 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 322 | CLANG_WARN_EMPTY_BODY = YES; 323 | CLANG_WARN_ENUM_CONVERSION = YES; 324 | CLANG_WARN_INT_CONVERSION = YES; 325 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 326 | CLANG_WARN_UNREACHABLE_CODE = YES; 327 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 328 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 329 | COPY_PHASE_STRIP = NO; 330 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 331 | ENABLE_STRICT_OBJC_MSGSEND = YES; 332 | GCC_C_LANGUAGE_STANDARD = gnu99; 333 | GCC_DYNAMIC_NO_PIC = NO; 334 | GCC_NO_COMMON_BLOCKS = YES; 335 | GCC_OPTIMIZATION_LEVEL = 0; 336 | GCC_PREPROCESSOR_DEFINITIONS = ( 337 | "DEBUG=1", 338 | "$(inherited)", 339 | ); 340 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 341 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 342 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 343 | GCC_WARN_UNDECLARED_SELECTOR = YES; 344 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 345 | GCC_WARN_UNUSED_FUNCTION = YES; 346 | GCC_WARN_UNUSED_VARIABLE = YES; 347 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 348 | MTL_ENABLE_DEBUG_INFO = YES; 349 | ONLY_ACTIVE_ARCH = YES; 350 | SDKROOT = iphoneos; 351 | }; 352 | name = Debug; 353 | }; 354 | EC6012C81B7CBC0800F04FBD /* Release */ = { 355 | isa = XCBuildConfiguration; 356 | buildSettings = { 357 | ALWAYS_SEARCH_USER_PATHS = NO; 358 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 359 | CLANG_CXX_LIBRARY = "libc++"; 360 | CLANG_ENABLE_MODULES = YES; 361 | CLANG_ENABLE_OBJC_ARC = YES; 362 | CLANG_WARN_BOOL_CONVERSION = YES; 363 | CLANG_WARN_CONSTANT_CONVERSION = YES; 364 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 365 | CLANG_WARN_EMPTY_BODY = YES; 366 | CLANG_WARN_ENUM_CONVERSION = YES; 367 | CLANG_WARN_INT_CONVERSION = YES; 368 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 369 | CLANG_WARN_UNREACHABLE_CODE = YES; 370 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 371 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 372 | COPY_PHASE_STRIP = NO; 373 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 374 | ENABLE_NS_ASSERTIONS = NO; 375 | ENABLE_STRICT_OBJC_MSGSEND = YES; 376 | GCC_C_LANGUAGE_STANDARD = gnu99; 377 | GCC_NO_COMMON_BLOCKS = YES; 378 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 379 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 380 | GCC_WARN_UNDECLARED_SELECTOR = YES; 381 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 382 | GCC_WARN_UNUSED_FUNCTION = YES; 383 | GCC_WARN_UNUSED_VARIABLE = YES; 384 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 385 | MTL_ENABLE_DEBUG_INFO = NO; 386 | SDKROOT = iphoneos; 387 | VALIDATE_PRODUCT = YES; 388 | }; 389 | name = Release; 390 | }; 391 | EC6012CA1B7CBC0800F04FBD /* Debug */ = { 392 | isa = XCBuildConfiguration; 393 | buildSettings = { 394 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 395 | INFOPLIST_FILE = "个人详情控制器/Info.plist"; 396 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 397 | PRODUCT_NAME = "$(TARGET_NAME)"; 398 | }; 399 | name = Debug; 400 | }; 401 | EC6012CB1B7CBC0800F04FBD /* Release */ = { 402 | isa = XCBuildConfiguration; 403 | buildSettings = { 404 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 405 | INFOPLIST_FILE = "个人详情控制器/Info.plist"; 406 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 407 | PRODUCT_NAME = "$(TARGET_NAME)"; 408 | }; 409 | name = Release; 410 | }; 411 | EC6012CD1B7CBC0800F04FBD /* Debug */ = { 412 | isa = XCBuildConfiguration; 413 | buildSettings = { 414 | BUNDLE_LOADER = "$(TEST_HOST)"; 415 | FRAMEWORK_SEARCH_PATHS = ( 416 | "$(SDKROOT)/Developer/Library/Frameworks", 417 | "$(inherited)", 418 | ); 419 | GCC_PREPROCESSOR_DEFINITIONS = ( 420 | "DEBUG=1", 421 | "$(inherited)", 422 | ); 423 | INFOPLIST_FILE = "个人详情控制器Tests/Info.plist"; 424 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 425 | PRODUCT_NAME = "$(TARGET_NAME)"; 426 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/个人详情控制器.app/个人详情控制器"; 427 | }; 428 | name = Debug; 429 | }; 430 | EC6012CE1B7CBC0800F04FBD /* Release */ = { 431 | isa = XCBuildConfiguration; 432 | buildSettings = { 433 | BUNDLE_LOADER = "$(TEST_HOST)"; 434 | FRAMEWORK_SEARCH_PATHS = ( 435 | "$(SDKROOT)/Developer/Library/Frameworks", 436 | "$(inherited)", 437 | ); 438 | INFOPLIST_FILE = "个人详情控制器Tests/Info.plist"; 439 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 440 | PRODUCT_NAME = "$(TARGET_NAME)"; 441 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/个人详情控制器.app/个人详情控制器"; 442 | }; 443 | name = Release; 444 | }; 445 | /* End XCBuildConfiguration section */ 446 | 447 | /* Begin XCConfigurationList section */ 448 | EC6012A11B7CBC0800F04FBD /* Build configuration list for PBXProject "个人详情控制器" */ = { 449 | isa = XCConfigurationList; 450 | buildConfigurations = ( 451 | EC6012C71B7CBC0800F04FBD /* Debug */, 452 | EC6012C81B7CBC0800F04FBD /* Release */, 453 | ); 454 | defaultConfigurationIsVisible = 0; 455 | defaultConfigurationName = Release; 456 | }; 457 | EC6012C91B7CBC0800F04FBD /* Build configuration list for PBXNativeTarget "个人详情控制器" */ = { 458 | isa = XCConfigurationList; 459 | buildConfigurations = ( 460 | EC6012CA1B7CBC0800F04FBD /* Debug */, 461 | EC6012CB1B7CBC0800F04FBD /* Release */, 462 | ); 463 | defaultConfigurationIsVisible = 0; 464 | }; 465 | EC6012CC1B7CBC0800F04FBD /* Build configuration list for PBXNativeTarget "个人详情控制器Tests" */ = { 466 | isa = XCConfigurationList; 467 | buildConfigurations = ( 468 | EC6012CD1B7CBC0800F04FBD /* Debug */, 469 | EC6012CE1B7CBC0800F04FBD /* Release */, 470 | ); 471 | defaultConfigurationIsVisible = 0; 472 | }; 473 | /* End XCConfigurationList section */ 474 | }; 475 | rootObject = EC60129E1B7CBC0800F04FBD /* Project object */; 476 | } 477 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器.xcodeproj/project.xcworkspace/xcuserdata/yuanzheng.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iThinkerYZ/PersonalFramework/bf8d0477554f8229e44046c55800f1fdc05d89d1/个人详情控制器/个人详情控制器.xcodeproj/project.xcworkspace/xcuserdata/yuanzheng.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器.xcodeproj/xcuserdata/yuanzheng.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 20 | 21 | 22 | 24 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器.xcodeproj/xcuserdata/yuanzheng.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | 个人详情控制器.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | EC6012A51B7CBC0800F04FBD 16 | 17 | primary 18 | 19 | 20 | EC6012BE1B7CBC0800F04FBD 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器.xcodeproj/xcuserdata/yuanzheng.xcuserdatad/xcschemes/个人详情控制器.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // 个人详情控制器 4 | // 5 | // Created by yz on 15/8/13. 6 | // Copyright (c) 2015年 yz. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // 个人详情控制器 4 | // 5 | // Created by yz on 15/8/13. 6 | // Copyright (c) 2015年 yz. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | #import "XMGPersonViewController.h" 12 | 13 | @interface AppDelegate () 14 | 15 | @end 16 | 17 | @implementation AppDelegate 18 | 19 | 20 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 21 | // Override point for customization after application launch. 22 | 23 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 24 | 25 | XMGPersonViewController *personVc = [[XMGPersonViewController alloc] init]; 26 | 27 | UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:personVc]; 28 | 29 | self.window.rootViewController = nav; 30 | 31 | [self.window makeKeyAndVisible]; 32 | 33 | 34 | return YES; 35 | } 36 | 37 | - (void)applicationWillResignActive:(UIApplication *)application { 38 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 39 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 40 | } 41 | 42 | - (void)applicationDidEnterBackground:(UIApplication *)application { 43 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 44 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 45 | } 46 | 47 | - (void)applicationWillEnterForeground:(UIApplication *)application { 48 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 49 | } 50 | 51 | - (void)applicationDidBecomeActive:(UIApplication *)application { 52 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 53 | } 54 | 55 | - (void)applicationWillTerminate:(UIApplication *)application { 56 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/Images.xcassets/lol.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "lol.jpg" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/Images.xcassets/lol.imageset/lol.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iThinkerYZ/PersonalFramework/bf8d0477554f8229e44046c55800f1fdc05d89d1/个人详情控制器/个人详情控制器/Images.xcassets/lol.imageset/lol.jpg -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/Images.xcassets/timo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "timo.jpg" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/Images.xcassets/timo.imageset/timo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iThinkerYZ/PersonalFramework/bf8d0477554f8229e44046c55800f1fdc05d89d1/个人详情控制器/个人详情控制器/Images.xcassets/timo.imageset/timo.jpg -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | iThinker.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/XMGPersonTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // XMGPersonTableViewController.h 3 | // 个人详情控制器 4 | // 5 | // Created by yz on 15/8/13. 6 | // Copyright (c) 2015年 yz. All rights reserved. 7 | // 8 | 9 | #import "YZPersonTableViewController.h" 10 | 11 | @interface XMGPersonTableViewController : YZPersonTableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/XMGPersonTableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // XMGPersonTableViewController.m 3 | // 个人详情控制器 4 | // 5 | // Created by yz on 15/8/13. 6 | // Copyright (c) 2015年 yz. All rights reserved. 7 | // 8 | 9 | #import "XMGPersonTableViewController.h" 10 | 11 | @interface XMGPersonTableViewController () 12 | 13 | @end 14 | 15 | @implementation XMGPersonTableViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view. 20 | NSLog(@"%s",__func__); 21 | 22 | } 23 | 24 | 25 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 26 | { 27 | return 20; 28 | } 29 | 30 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 31 | { 32 | static NSString *ID = @"cell"; 33 | 34 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID]; 35 | 36 | if (cell == nil) { 37 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID 38 | ]; 39 | cell.backgroundColor = [UIColor lightGrayColor]; 40 | } 41 | 42 | 43 | cell.textLabel.text = [NSString stringWithFormat:@"%ld",indexPath.row]; 44 | 45 | return cell; 46 | } 47 | @end 48 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/XMGPersonViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // XMGPersonViewController.h 3 | // 个人详情控制器 4 | // 5 | // Created by yz on 15/8/13. 6 | // Copyright (c) 2015年 yz. All rights reserved. 7 | // 8 | 9 | #import "YZPersonViewController.h" 10 | 11 | @interface XMGPersonViewController : YZPersonViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/XMGPersonViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // XMGPersonViewController.m 3 | // 个人详情控制器 4 | // 5 | // Created by yz on 15/8/13. 6 | // Copyright (c) 2015年 yz. All rights reserved. 7 | // 8 | 9 | #import "XMGPersonViewController.h" 10 | #import "YZWeiBoTableViewController.h" 11 | #import "XMGPersonTableViewController.h" 12 | 13 | @interface XMGPersonViewController () 14 | 15 | @end 16 | 17 | #pragma mark - XMGPersonViewController继承YZPersonViewController,是它的子类 18 | 19 | @implementation XMGPersonViewController 20 | 21 | - (void)viewDidLoad { 22 | [super viewDidLoad]; 23 | // Do any additional setup after loading the view. 24 | 25 | // 设置个人头像 26 | self.personIconImage = [UIImage imageNamed:@"timo"]; 27 | 28 | // 设置个人明信片 29 | self.personCardImage = [UIImage imageNamed:@"lol"]; 30 | 31 | // 设置导航条标题 32 | self.title = @"小码哥教育"; 33 | 34 | 35 | // 添加子控制器,需要显示几个子控制器的tableView就添加几个,跟UITabBarController用法一样。 36 | // tabBar上按钮的标题 = 子控制器的标题 37 | // 个人 38 | XMGPersonTableViewController *personVC = [[XMGPersonTableViewController alloc] init]; 39 | 40 | personVC.title = @"个人"; 41 | 42 | [self addChildViewController:personVC]; 43 | 44 | // 微博 45 | YZWeiBoTableViewController *weiboVC = [[YZWeiBoTableViewController alloc] init]; 46 | 47 | weiboVC.title = @"微博"; 48 | 49 | [self addChildViewController:weiboVC]; 50 | 51 | } 52 | @end 53 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/YZPerson/Category/UIImage+Image.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+Image.h 3 | // 4 | // 5 | // Created by yz on 15/7/6. 6 | // Copyright (c) 2015年 yz. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIImage (Image) 12 | 13 | 14 | // 根据颜色生成一张尺寸为1*1的相同颜色图片 15 | + (UIImage *)imageWithColor:(UIColor *)color; 16 | 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/YZPerson/Category/UIImage+Image.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+Image.m 3 | // 4 | // 5 | // Created by yz on 15/7/6. 6 | // Copyright (c) 2015年 yz. All rights reserved. 7 | // 8 | 9 | #import "UIImage+Image.h" 10 | 11 | @implementation UIImage (Image) 12 | 13 | + (UIImage *)imageWithColor:(UIColor *)color 14 | { 15 | // 描述矩形 16 | CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f); 17 | 18 | // 开启位图上下文 19 | UIGraphicsBeginImageContext(rect.size); 20 | // 获取位图上下文 21 | CGContextRef context = UIGraphicsGetCurrentContext(); 22 | // 使用color演示填充上下文 23 | CGContextSetFillColorWithColor(context, [color CGColor]); 24 | // 渲染上下文 25 | CGContextFillRect(context, rect); 26 | // 从上下文中获取图片 27 | UIImage *theImage = UIGraphicsGetImageFromCurrentImageContext(); 28 | // 结束上下文 29 | UIGraphicsEndImageContext(); 30 | 31 | return theImage; 32 | } 33 | 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/YZPerson/YZPersonTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // YZPersonTableViewController.h 3 | // 个人详情控制器 4 | // 5 | // Created by yz on 15/8/13. 6 | // Copyright (c) 2015年 yz. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface YZPersonTableViewController : UITableViewController 12 | 13 | @property (nonatomic, weak) UIView *tabBar; 14 | 15 | @property (nonatomic, weak) NSLayoutConstraint *headHCons; 16 | 17 | 18 | @property (nonatomic, weak) UILabel *titleLabel; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/YZPerson/YZPersonTableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // YZPersonTableViewController.m 3 | // 个人详情控制器 4 | // 5 | // Created by yz on 15/8/13. 6 | // Copyright (c) 2015年 yz. All rights reserved. 7 | // 8 | 9 | #import "YZPersonTableViewController.h" 10 | 11 | #import "YZTableView.h" 12 | #import "UIImage+Image.h" 13 | 14 | #define YZHeadViewH 200 15 | 16 | #define YZHeadViewMinH 64 17 | 18 | #define YZTabBarH 44 19 | 20 | @interface YZPersonTableViewController () 21 | 22 | 23 | @property (nonatomic, assign) CGFloat lastOffsetY; 24 | 25 | @end 26 | 27 | @implementation YZPersonTableViewController 28 | 29 | 30 | - (void)loadView 31 | { 32 | YZTableView *tableView = [[YZTableView alloc] initWithFrame:[UIScreen mainScreen].bounds]; 33 | 34 | tableView.delegate = self; 35 | 36 | tableView.dataSource = self; 37 | 38 | self.tableView = tableView; 39 | 40 | self.view = tableView; 41 | } 42 | 43 | - (void)viewDidLoad { 44 | [super viewDidLoad]; 45 | 46 | 47 | 48 | _lastOffsetY = -(YZHeadViewH + YZTabBarH); 49 | 50 | // 设置顶部额外滚动区域 51 | self.tableView.contentInset = UIEdgeInsetsMake(YZHeadViewH + YZTabBarH , 0, 0, 0); 52 | 53 | YZTableView *tableView = (YZTableView *)self.tableView; 54 | tableView.tabBar = _tabBar; 55 | 56 | 57 | 58 | } 59 | 60 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView 61 | { 62 | // 获取当前偏移量 63 | CGFloat offsetY = scrollView.contentOffset.y; 64 | 65 | // 获取偏移量差值 66 | CGFloat delta = offsetY - _lastOffsetY; 67 | 68 | CGFloat headH = YZHeadViewH - delta; 69 | 70 | if (headH < YZHeadViewMinH) { 71 | headH = YZHeadViewMinH; 72 | } 73 | 74 | _headHCons.constant = headH; 75 | 76 | // 计算透明度,刚好拖动200 - 64 136,透明度为1 77 | 78 | CGFloat alpha = delta / (YZHeadViewH - YZHeadViewMinH); 79 | 80 | // 获取透明颜色 81 | UIColor *alphaColor = [UIColor colorWithWhite:0 alpha:alpha]; 82 | [_titleLabel setTextColor:alphaColor]; 83 | 84 | // 设置导航条背景图片 85 | [self.navigationController.navigationBar setBackgroundImage:[UIImage imageWithColor:[UIColor colorWithWhite:1 alpha:alpha]] forBarMetrics:UIBarMetricsDefault]; 86 | 87 | } 88 | 89 | 90 | 91 | 92 | 93 | @end 94 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/YZPerson/YZPersonViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // YZPersonViewController.h 3 | // 个人详情控制器 4 | // 5 | // Created by yz on 15/8/13. 6 | // Copyright (c) 2015年 yz. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface YZPersonViewController : UIViewController 12 | 13 | 14 | // 个人头像控件 15 | @property (strong, nonatomic) UIImage *personIconImage; 16 | 17 | // 个人明信片控件 18 | @property (strong, nonatomic) UIImage *personCardImage; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/YZPerson/YZPersonViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // YZPersonViewController.m 3 | // 个人详情控制器 4 | // 5 | // Created by yz on 15/8/13. 6 | // Copyright (c) 2015年 yz. All rights reserved. 7 | // 8 | 9 | #import "YZPersonViewController.h" 10 | 11 | #import "YZPersonTableViewController.h" 12 | 13 | #define YZClickBtnObjcKey @"clickBtnObjc" 14 | #define YZClickBtnNote @"clickBtn" 15 | @interface YZPersonViewController () 16 | 17 | @property (nonatomic, weak) UILabel *titleLabel; 18 | 19 | @property (weak, nonatomic) IBOutlet UIView *tabBar; 20 | 21 | @property (weak, nonatomic) IBOutlet UIView *contentView; 22 | 23 | @property (nonatomic, weak) UIButton *selectedBtn; 24 | 25 | @property (weak, nonatomic) IBOutlet NSLayoutConstraint *headViewCons; 26 | 27 | // 个人头像控件 28 | @property (weak, nonatomic) IBOutlet UIImageView *personIconView; 29 | 30 | // 个人明信片控件 31 | @property (weak, nonatomic) IBOutlet UIImageView *personCardView; 32 | 33 | 34 | @end 35 | 36 | @implementation YZPersonViewController 37 | 38 | - (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 39 | { 40 | if (self = [super initWithNibName:@"YZPersonViewController" bundle:nibBundleOrNil]) { 41 | 42 | } 43 | return self; 44 | } 45 | 46 | - (void)viewDidLoad { 47 | 48 | [super viewDidLoad]; 49 | 50 | // 不自动添加额外滚动区域 51 | self.automaticallyAdjustsScrollViewInsets = NO; 52 | 53 | // 接收按钮点击通知 54 | [[NSNotificationCenter defaultCenter] addObserverForName:YZClickBtnNote object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *note) { 55 | 56 | UIButton *clickBtnObjc = note.userInfo[YZClickBtnObjcKey]; 57 | 58 | [self btnClick:clickBtnObjc]; 59 | 60 | 61 | }]; 62 | } 63 | 64 | // 设置导航条 65 | - (void)setUpNav 66 | { 67 | // 导航条背景透明 68 | [self.navigationController.navigationBar setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault]; 69 | [self.navigationController.navigationBar setShadowImage:[[UIImage alloc] init]]; 70 | 71 | // 设置导航条中间view 72 | UILabel *label = [[UILabel alloc] init]; 73 | 74 | _titleLabel = label; 75 | 76 | label.font = [UIFont boldSystemFontOfSize:18]; 77 | 78 | label.text = self.title; 79 | 80 | [label setTextColor:[UIColor colorWithWhite:1 alpha:0]]; 81 | 82 | [label sizeToFit]; 83 | 84 | self.navigationItem.titleView = label; 85 | } 86 | 87 | // 设置子控制器 88 | - (void)setUpChildControlller 89 | { 90 | for (YZPersonTableViewController *personChildVc in self.childViewControllers) { 91 | 92 | self.personIconView.image = self.personIconImage; 93 | 94 | self.personCardView.image = self.personCardImage; 95 | 96 | // 传递tabBar,用来判断点击了哪个按钮 97 | personChildVc.tabBar = _tabBar; 98 | 99 | // 传递高度约束,用来移动头部视图 100 | personChildVc.headHCons = _headViewCons; 101 | 102 | // 传递标题控件,设置文字透明 103 | personChildVc.titleLabel = _titleLabel; 104 | 105 | } 106 | } 107 | 108 | - (void)viewWillAppear:(BOOL)animated 109 | { 110 | [super viewWillAppear:animated]; 111 | 112 | // 即将显示的时候做一次初始化操作 113 | static dispatch_once_t onceToken; 114 | dispatch_once(&onceToken, ^{ 115 | 116 | [self setUpNav]; 117 | 118 | // 设置子控制器 119 | [self setUpChildControlller]; 120 | 121 | // 设置tabBar 122 | [self setUpTabBar]; 123 | }); 124 | 125 | } 126 | 127 | 128 | // 设置tabBar 129 | - (void)setUpTabBar 130 | { 131 | // 遍历子控制器 132 | 133 | for (UIViewController *childVc in self.childViewControllers) { 134 | 135 | UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; 136 | 137 | btn.tag = _tabBar.subviews.count; 138 | 139 | btn.titleLabel.font = [UIFont systemFontOfSize:14]; 140 | 141 | [btn setTitle:childVc.title forState:UIControlStateNormal]; 142 | 143 | [btn setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal]; 144 | 145 | [btn setTitleColor:[UIColor blackColor] forState:UIControlStateSelected]; 146 | 147 | [btn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchDown]; 148 | 149 | if (btn.tag == 0) { 150 | [self btnClick:btn]; 151 | } 152 | 153 | [_tabBar addSubview:btn]; 154 | 155 | 156 | } 157 | 158 | } 159 | 160 | - (void)btnClick:(UIButton *)btn 161 | { 162 | 163 | if (btn == _selectedBtn) { 164 | return; 165 | } 166 | 167 | // 将上一次选中的控制器的view移除内容视图 168 | 169 | UITableView *lastVcView = (UITableView *)[self.childViewControllers[_selectedBtn.tag] view]; 170 | 171 | [lastVcView removeFromSuperview]; 172 | 173 | // 选中按钮 174 | _selectedBtn.selected = NO; 175 | btn.selected = YES; 176 | _selectedBtn = btn; 177 | 178 | // 切换内容视图显示 179 | UITableViewController *vc = self.childViewControllers[btn.tag]; 180 | 181 | vc.view.frame = _contentView.bounds; 182 | 183 | [_contentView addSubview:vc.view]; 184 | 185 | // 设置tableView的滚动区域 186 | vc.tableView.contentOffset = lastVcView.contentOffset; 187 | } 188 | 189 | - (void)viewDidLayoutSubviews 190 | { 191 | [super viewDidLayoutSubviews]; 192 | 193 | 194 | // 布局tabBar子控件位置 195 | NSUInteger count = _tabBar.subviews.count; 196 | 197 | CGFloat btnW = self.view.bounds.size.width / count; 198 | 199 | CGFloat btnH = _tabBar.bounds.size.height; 200 | 201 | CGFloat btnX = 0; 202 | 203 | CGFloat btnY = 0; 204 | 205 | for (int i = 0; i < count; i++) { 206 | 207 | btnX = i * btnW; 208 | 209 | UIView *childV = _tabBar.subviews[i]; 210 | 211 | childV.frame = CGRectMake(btnX, btnY, btnW, btnH); 212 | 213 | } 214 | } 215 | 216 | 217 | 218 | @end 219 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/YZPerson/YZPersonViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/YZPerson/YZTableView.h: -------------------------------------------------------------------------------- 1 | // 2 | // YZTableView.h 3 | // 个人详情控制器 4 | // 5 | // Created by yz on 15/8/13. 6 | // Copyright (c) 2015年 yz. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface YZTableView : UITableView 12 | 13 | 14 | 15 | @property (nonatomic, weak) UIView *tabBar; 16 | 17 | 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/YZPerson/YZTableView.m: -------------------------------------------------------------------------------- 1 | // 2 | // YZTableView.m 3 | // 个人详情控制器 4 | // 5 | // Created by yz on 15/8/13. 6 | // Copyright (c) 2015年 yz. All rights reserved. 7 | // 8 | 9 | #import "YZTableView.h" 10 | #define YZClickBtnObjcKey @"clickBtnObjc" 11 | #define YZClickBtnNote @"clickBtn" 12 | 13 | @interface YZTableView () 14 | 15 | 16 | 17 | @end 18 | 19 | @implementation YZTableView 20 | 21 | 22 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 23 | { 24 | UITouch *touch = [touches anyObject]; 25 | CGPoint curP = [touch locationInView:self]; 26 | 27 | 28 | for (UIView *tabBarChildView in _tabBar.subviews) { 29 | 30 | CGPoint childP = [self convertPoint:curP toView:tabBarChildView]; 31 | 32 | if ([tabBarChildView pointInside:childP withEvent:event]) { 33 | // 点击了按钮 34 | 35 | // 通知个人控制器切换内容视图 36 | [[NSNotificationCenter defaultCenter] postNotificationName:YZClickBtnNote object:nil userInfo:@{YZClickBtnObjcKey: tabBarChildView}]; 37 | 38 | // 处理完事件,结束当前事件处理 39 | return; 40 | 41 | } 42 | } 43 | 44 | // 如果没有处理事件,就调用系统自带的处理方式 45 | [super touchesBegan:touches withEvent:event]; 46 | 47 | 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/YZWeiBoTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // YZWeiBoTableViewController.h 3 | // 个人详情控制器 4 | // 5 | // Created by yz on 15/8/13. 6 | // Copyright (c) 2015年 yz. All rights reserved. 7 | // 8 | 9 | #import "YZPersonTableViewController.h" 10 | 11 | @interface YZWeiBoTableViewController : YZPersonTableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/YZWeiBoTableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // YZWeiBoTableViewController.m 3 | // 个人详情控制器 4 | // 5 | // Created by yz on 15/8/13. 6 | // Copyright (c) 2015年 yz. All rights reserved. 7 | // 8 | 9 | #import "YZWeiBoTableViewController.h" 10 | 11 | @interface YZWeiBoTableViewController () 12 | 13 | @end 14 | 15 | @implementation YZWeiBoTableViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view. 20 | NSLog(@"%s",__func__); 21 | 22 | } 23 | 24 | 25 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 26 | { 27 | return 20; 28 | } 29 | 30 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 31 | { 32 | static NSString *ID = @"cell"; 33 | 34 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID]; 35 | 36 | if (cell == nil) { 37 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID 38 | ]; 39 | cell.backgroundColor = [UIColor orangeColor]; 40 | } 41 | 42 | 43 | cell.textLabel.text = [NSString stringWithFormat:@"%ld",indexPath.row]; 44 | 45 | return cell; 46 | } 47 | @end 48 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // 个人详情控制器 4 | // 5 | // Created by yz on 15/8/13. 6 | // Copyright (c) 2015年 yz. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | iThinker.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /个人详情控制器/个人详情控制器Tests/_______Tests.m: -------------------------------------------------------------------------------- 1 | // 2 | // _______Tests.m 3 | // 个人详情控制器Tests 4 | // 5 | // Created by yz on 15/8/13. 6 | // Copyright (c) 2015年 yz. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface _______Tests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation _______Tests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | --------------------------------------------------------------------------------