Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified PanelTableView/.DS_Store
Binary file not shown.
6 changes: 6 additions & 0 deletions PanelTableView/Classes/PanelView.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
*/

#import "PanelView.h"
#import "FountionCommon.h"

@interface PanelView()
- (void)show:(BOOL)show;
Expand All @@ -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];
Expand Down
6 changes: 6 additions & 0 deletions PanelTableView/Classes/PanelsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file modified sample project/SampleApp/.DS_Store
Binary file not shown.
13 changes: 13 additions & 0 deletions sample project/SampleApp/Classes/FountionCommon.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// FountionCommon.h
// SampleApp
//
// Created by 曾 宪华 on 14-1-24.
//
//

#import <Foundation/Foundation.h>

@interface FountionCommon : NSObject
+ (CGFloat)getAdapterHeight;
@end
19 changes: 19 additions & 0 deletions sample project/SampleApp/Classes/FountionCommon.m
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions sample project/SampleApp/Classes/SamplePanelsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
6 changes: 6 additions & 0 deletions sample project/SampleApp/SampleApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand All @@ -33,6 +34,8 @@
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
32CA4F630368D1EE00C91783 /* SampleApp_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SampleApp_Prefix.pch; sourceTree = "<group>"; };
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 = "<group>"; };
AB65E6F81892002F00064C67 /* FountionCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FountionCommon.h; path = Classes/FountionCommon.h; sourceTree = "<group>"; };
AB65E6F91892002F00064C67 /* FountionCommon.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FountionCommon.m; path = Classes/FountionCommon.m; sourceTree = "<group>"; };
F8623067132AF7A6007AF95C /* MainWindow-iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "MainWindow-iPad.xib"; path = "Resources-iPad/MainWindow-iPad.xib"; sourceTree = "<group>"; };
F862306D132AF7E6007AF95C /* SamplePanelsViewControllerForiPad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SamplePanelsViewControllerForiPad.h; sourceTree = "<group>"; };
F862306E132AF7E6007AF95C /* SamplePanelsViewControllerForiPad.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SamplePanelsViewControllerForiPad.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -144,6 +147,8 @@
F8ABF18D12A0D4C000D78DF9 /* PanelView.m */,
F8ABF18E12A0D4C000D78DF9 /* PanelsViewController.h */,
F8ABF18F12A0D4C000D78DF9 /* PanelsViewController.m */,
AB65E6F81892002F00064C67 /* FountionCommon.h */,
AB65E6F91892002F00064C67 /* FountionCommon.m */,
);
name = PanelTableView;
sourceTree = "<group>";
Expand Down Expand Up @@ -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 */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>C2DC6382-C625-46E1-AE98-3F140EBC4086</string>
<key>IDESourceControlProjectName</key>
<string>SampleApp</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>46D4F8C9-8A7A-41FC-98DF-4C354D7A0DFF</key>
<string>https://github.com/xhzengAIB/PanelTableView.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>sample project/SampleApp/SampleApp.xcodeproj/project.xcworkspace</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>46D4F8C9-8A7A-41FC-98DF-4C354D7A0DFF</key>
<string>../../../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>https://github.com/xhzengAIB/PanelTableView.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>110</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>46D4F8C9-8A7A-41FC-98DF-4C354D7A0DFF</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>46D4F8C9-8A7A-41FC-98DF-4C354D7A0DFF</string>
<key>IDESourceControlWCCName</key>
<string>PanelTableView</string>
</dict>
</array>
</dict>
</plist>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
BuildableName = "SampleApp.app"
BlueprintName = "SampleApp"
ReferencedContainer = "container:SampleApp.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
BuildableName = "SampleApp.app"
BlueprintName = "SampleApp"
ReferencedContainer = "container:SampleApp.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
BuildableName = "SampleApp.app"
BlueprintName = "SampleApp"
ReferencedContainer = "container:SampleApp.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
BuildableName = "SampleApp.app"
BlueprintName = "SampleApp"
ReferencedContainer = "container:SampleApp.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>SampleApp.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>1D6058900D05DD3D006BFB54</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>