diff --git a/PanelTableView/.DS_Store b/PanelTableView/.DS_Store index f4dd47c..2566629 100644 Binary files a/PanelTableView/.DS_Store and b/PanelTableView/.DS_Store differ diff --git a/PanelTableView/Classes/PanelView.m b/PanelTableView/Classes/PanelView.m index b343c80..922801f 100644 --- a/PanelTableView/Classes/PanelView.m +++ b/PanelTableView/Classes/PanelView.m @@ -32,6 +32,7 @@ */ #import "PanelView.h" +#import "FountionCommon.h" @interface PanelView() - (void)show:(BOOL)show; @@ -46,6 +47,11 @@ - (id)initWithFrame:(CGRect)frame [self setBackgroundColor:[UIColor whiteColor]]; _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0,0,frame.size.width,frame.size.height)]; + UIEdgeInsets contentInset = _tableView.contentInset; + contentInset.top = [FountionCommon getAdapterHeight]; + _tableView.contentInset = contentInset; + _tableView.scrollIndicatorInsets = contentInset; + [self addSubview:_tableView]; [_tableView setDelegate:self]; [_tableView setDataSource:self]; diff --git a/PanelTableView/Classes/PanelsViewController.m b/PanelTableView/Classes/PanelsViewController.m index 9c99a05..fd70030 100644 --- a/PanelTableView/Classes/PanelsViewController.m +++ b/PanelTableView/Classes/PanelsViewController.m @@ -105,6 +105,12 @@ - (void)viewWillDisappear:(BOOL)animated [panelView pageWillDisappear]; } +- (void)viewDidLoad { + [super viewDidLoad]; + if ([self respondsToSelector:@selector(automaticallyAdjustsScrollViewInsets)]) + self.automaticallyAdjustsScrollViewInsets = NO; +} + #pragma mark editing - (void)shouldWiggle:(BOOL)wiggle diff --git a/sample project/SampleApp/.DS_Store b/sample project/SampleApp/.DS_Store index ead6662..5452f76 100644 Binary files a/sample project/SampleApp/.DS_Store and b/sample project/SampleApp/.DS_Store differ diff --git a/sample project/SampleApp/Classes/FountionCommon.h b/sample project/SampleApp/Classes/FountionCommon.h new file mode 100644 index 0000000..4337a3d --- /dev/null +++ b/sample project/SampleApp/Classes/FountionCommon.h @@ -0,0 +1,13 @@ +// +// FountionCommon.h +// SampleApp +// +// Created by 曾 宪华 on 14-1-24. +// +// + +#import + +@interface FountionCommon : NSObject ++ (CGFloat)getAdapterHeight; +@end diff --git a/sample project/SampleApp/Classes/FountionCommon.m b/sample project/SampleApp/Classes/FountionCommon.m new file mode 100644 index 0000000..aa19b09 --- /dev/null +++ b/sample project/SampleApp/Classes/FountionCommon.m @@ -0,0 +1,19 @@ +// +// FountionCommon.m +// SampleApp +// +// Created by 曾 宪华 on 14-1-24. +// +// + +#import "FountionCommon.h" + +@implementation FountionCommon ++ (CGFloat)getAdapterHeight { + CGFloat adapterHeight = 0; + if ([[[UIDevice currentDevice] systemVersion] integerValue] >= 7.0) { + adapterHeight = 64; + } + return adapterHeight; +} +@end diff --git a/sample project/SampleApp/Classes/SamplePanelsViewController.m b/sample project/SampleApp/Classes/SamplePanelsViewController.m index 3b3ff3d..6b78aeb 100644 --- a/sample project/SampleApp/Classes/SamplePanelsViewController.m +++ b/sample project/SampleApp/Classes/SamplePanelsViewController.m @@ -34,6 +34,12 @@ - (id)init return self; } +- (void)viewDidLoad { + [super viewDidLoad]; + if ([self.navigationController.navigationBar respondsToSelector:@selector(setBarTintColor:)]) + [self.navigationController.navigationBar setBarTintColor:[UIColor redColor]]; +} + - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; diff --git a/sample project/SampleApp/SampleApp.xcodeproj/project.pbxproj b/sample project/SampleApp/SampleApp.xcodeproj/project.pbxproj index 7d17327..2c44a13 100755 --- a/sample project/SampleApp/SampleApp.xcodeproj/project.pbxproj +++ b/sample project/SampleApp/SampleApp.xcodeproj/project.pbxproj @@ -13,6 +13,7 @@ 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; + AB65E6FA1892002F00064C67 /* FountionCommon.m in Sources */ = {isa = PBXBuildFile; fileRef = AB65E6F91892002F00064C67 /* FountionCommon.m */; }; F8623068132AF7A6007AF95C /* MainWindow-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = F8623067132AF7A6007AF95C /* MainWindow-iPad.xib */; }; F862306F132AF7E6007AF95C /* SamplePanelsViewControllerForiPad.m in Sources */ = {isa = PBXBuildFile; fileRef = F862306E132AF7E6007AF95C /* SamplePanelsViewControllerForiPad.m */; }; F8ABF19012A0D4C000D78DF9 /* PanelIndexPath.m in Sources */ = {isa = PBXBuildFile; fileRef = F8ABF18B12A0D4C000D78DF9 /* PanelIndexPath.m */; }; @@ -33,6 +34,8 @@ 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 32CA4F630368D1EE00C91783 /* SampleApp_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SampleApp_Prefix.pch; sourceTree = ""; }; 8D1107310486CEB800E47090 /* SampleApp-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "SampleApp-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; + AB65E6F81892002F00064C67 /* FountionCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FountionCommon.h; path = Classes/FountionCommon.h; sourceTree = ""; }; + AB65E6F91892002F00064C67 /* FountionCommon.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FountionCommon.m; path = Classes/FountionCommon.m; sourceTree = ""; }; F8623067132AF7A6007AF95C /* MainWindow-iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "MainWindow-iPad.xib"; path = "Resources-iPad/MainWindow-iPad.xib"; sourceTree = ""; }; F862306D132AF7E6007AF95C /* SamplePanelsViewControllerForiPad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SamplePanelsViewControllerForiPad.h; sourceTree = ""; }; F862306E132AF7E6007AF95C /* SamplePanelsViewControllerForiPad.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SamplePanelsViewControllerForiPad.m; sourceTree = ""; }; @@ -144,6 +147,8 @@ F8ABF18D12A0D4C000D78DF9 /* PanelView.m */, F8ABF18E12A0D4C000D78DF9 /* PanelsViewController.h */, F8ABF18F12A0D4C000D78DF9 /* PanelsViewController.m */, + AB65E6F81892002F00064C67 /* FountionCommon.h */, + AB65E6F91892002F00064C67 /* FountionCommon.m */, ); name = PanelTableView; sourceTree = ""; @@ -215,6 +220,7 @@ 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 1D3623260D0F684500981E51 /* SampleAppAppDelegate.m in Sources */, F8ABF19012A0D4C000D78DF9 /* PanelIndexPath.m in Sources */, + AB65E6FA1892002F00064C67 /* FountionCommon.m in Sources */, F8ABF19112A0D4C000D78DF9 /* PanelView.m in Sources */, F8ABF19212A0D4C000D78DF9 /* PanelsViewController.m in Sources */, F8ABF19912A0D4E200D78DF9 /* SamplePanelsViewController.m in Sources */, diff --git a/sample project/SampleApp/SampleApp.xcodeproj/project.xcworkspace/xcshareddata/SampleApp.xccheckout b/sample project/SampleApp/SampleApp.xcodeproj/project.xcworkspace/xcshareddata/SampleApp.xccheckout new file mode 100644 index 0000000..2eafe51 --- /dev/null +++ b/sample project/SampleApp/SampleApp.xcodeproj/project.xcworkspace/xcshareddata/SampleApp.xccheckout @@ -0,0 +1,41 @@ + + + + + IDESourceControlProjectFavoriteDictionaryKey + + IDESourceControlProjectIdentifier + C2DC6382-C625-46E1-AE98-3F140EBC4086 + IDESourceControlProjectName + SampleApp + IDESourceControlProjectOriginsDictionary + + 46D4F8C9-8A7A-41FC-98DF-4C354D7A0DFF + https://github.com/xhzengAIB/PanelTableView.git + + IDESourceControlProjectPath + sample project/SampleApp/SampleApp.xcodeproj/project.xcworkspace + IDESourceControlProjectRelativeInstallPathDictionary + + 46D4F8C9-8A7A-41FC-98DF-4C354D7A0DFF + ../../../.. + + IDESourceControlProjectURL + https://github.com/xhzengAIB/PanelTableView.git + IDESourceControlProjectVersion + 110 + IDESourceControlProjectWCCIdentifier + 46D4F8C9-8A7A-41FC-98DF-4C354D7A0DFF + IDESourceControlProjectWCConfigurations + + + IDESourceControlRepositoryExtensionIdentifierKey + public.vcs.git + IDESourceControlWCCIdentifierKey + 46D4F8C9-8A7A-41FC-98DF-4C354D7A0DFF + IDESourceControlWCCName + PanelTableView + + + + diff --git a/sample project/SampleApp/SampleApp.xcodeproj/project.xcworkspace/xcuserdata/JackMacbook.xcuserdatad/UserInterfaceState.xcuserstate b/sample project/SampleApp/SampleApp.xcodeproj/project.xcworkspace/xcuserdata/JackMacbook.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..c8fe7a2 Binary files /dev/null and b/sample project/SampleApp/SampleApp.xcodeproj/project.xcworkspace/xcuserdata/JackMacbook.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/sample project/SampleApp/SampleApp.xcodeproj/xcuserdata/JackMacbook.xcuserdatad/xcschemes/SampleApp.xcscheme b/sample project/SampleApp/SampleApp.xcodeproj/xcuserdata/JackMacbook.xcuserdatad/xcschemes/SampleApp.xcscheme new file mode 100644 index 0000000..dd2a9e3 --- /dev/null +++ b/sample project/SampleApp/SampleApp.xcodeproj/xcuserdata/JackMacbook.xcuserdatad/xcschemes/SampleApp.xcscheme @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sample project/SampleApp/SampleApp.xcodeproj/xcuserdata/JackMacbook.xcuserdatad/xcschemes/xcschememanagement.plist b/sample project/SampleApp/SampleApp.xcodeproj/xcuserdata/JackMacbook.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..2818fed --- /dev/null +++ b/sample project/SampleApp/SampleApp.xcodeproj/xcuserdata/JackMacbook.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + SampleApp.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 1D6058900D05DD3D006BFB54 + + primary + + + + +