Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- added shadow between menuTableView and contentView

  • Loading branch information...
commit e3afdb8025c3e0432f55c66c0eadd55c94e67702 1 parent a25be9b
@honcheng authored
View
1  PaperFoldMenuController/PaperFoldMenuController.h
@@ -34,6 +34,7 @@
#import <UIKit/UIKit.h>
#import "PaperFoldView.h"
#import "PaperFoldMenuControllerDelegate.h"
+#import "ShadowView.h"
@interface PaperFoldMenuController : UIViewController <PaperFoldViewDelegate, UITableViewDataSource, UITableViewDelegate>
@property (nonatomic, strong) PaperFoldView *paperFoldView;
View
12 PaperFoldMenuController/PaperFoldMenuController.m
@@ -35,6 +35,10 @@
@interface PaperFoldMenuController ()
/**
+ * A UIView with shadow at joint between the menu and content view
+ */
+@property (nonatomic, strong) ShadowView *menuTableViewSideShadowView;
+/**
* This method reloads the menu on the left
* and refresh the screenshot of the menu used in
* PaperFold
@@ -64,6 +68,14 @@ - (id)initWithMenuWidth:(float)menuWidth
[_menuTableView setDelegate:self];
[_menuTableView setDataSource:self];
+ _menuTableViewSideShadowView = [[ShadowView alloc] initWithFrame:CGRectMake(_menuTableView.frame.size.width-3,0,3,[self.view bounds].size.height) foldDirection:FoldDirectionHorizontal];
+ [_menuTableViewSideShadowView setColorArrays:@[[UIColor clearColor],[UIColor colorWithWhite:0 alpha:0.6]]];
+ /**
+ * added to the leftFoldView instead of leftFoldView.contentView bec
+ * so that the shadow does not appear while folding
+ */
+ [_paperFoldView.leftFoldView addSubview:_menuTableViewSideShadowView];
+
}
return self;
}
Please sign in to comment.
Something went wrong with that request. Please try again.