Skip to content

点击 left item ,打开or关闭 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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 DDMenuController/.DS_Store
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
</Bucket>
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0710"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "033A4620148691F6002014C7"
BuildableName = "DDMenuController.app"
BlueprintName = "DDMenuController"
ReferencedContainer = "container:DDMenuController.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "033A4620148691F6002014C7"
BuildableName = "DDMenuController.app"
BlueprintName = "DDMenuController"
ReferencedContainer = "container:DDMenuController.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "033A4620148691F6002014C7"
BuildableName = "DDMenuController.app"
BlueprintName = "DDMenuController"
ReferencedContainer = "container:DDMenuController.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "033A4620148691F6002014C7"
BuildableName = "DDMenuController.app"
BlueprintName = "DDMenuController"
ReferencedContainer = "container:DDMenuController.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>DDMenuController.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>033A4620148691F6002014C7</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
1 change: 1 addition & 0 deletions DDMenuController/DDMenuController/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(


FeedController *mainController = [[FeedController alloc] init];

DDMenuController *rootController = [[DDMenuController alloc] initWithRootViewController:mainController];
_menuController = rootController;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,15 @@ - (NSString*)tableView:(UITableView*)tableView titleForHeaderInSection:(NSIntege

- (void)tableView:(UITableView*)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

// lets just push another feed view
// lets just push another feed view

UINavigationController *menuController = (UINavigationController*)((AppDelegate*)[[UIApplication sharedApplication] delegate]).menuController;

FeedController *controller = [[FeedController alloc] init];
[menuController pushViewController:controller animated:YES];

[tableView deselectRowAtIndexPath:indexPath animated:YES];

//[tableView deselectRowAtIndexPath:indexPath animated:YES];

}

Expand Down
14 changes: 13 additions & 1 deletion DDMenuController/DDMenuController/DDMenuController.m
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ - (void)showRootController:(BOOL)animated {
}

- (void)showLeftController:(BOOL)animated {

if (!_menuFlags.canShowLeft) return;

if (_menuFlags.respondsToWillShowViewController) {
Expand Down Expand Up @@ -534,8 +535,19 @@ - (void)setLeftController:(UIViewController *)leftController {

- (void)showLeft:(id)sender {

[self showLeftController:YES];
NSLog(@" dian ji an niu canShowLeft - %d ", _menuFlags.canShowLeft );
NSLog(@" dian ji an niu showingLeftView- %d ", _menuFlags.showingLeftView );//
NSLog(@" dian ji an niu respondsToWillShowViewController- %d ", _menuFlags.respondsToWillShowViewController );

NSLog(@" 打开left ==1 没打开left == 0 showingLeftView- %d ", _menuFlags.showingLeftView );//

if (_menuFlags.showingLeftView == 1) {
[self showRootController:YES];
}
else
{
[self showLeftController:YES];
}
}

- (void)showRight:(id)sender {
Expand Down