https://github.com/tinymind/LSFloatingActionMenu
tinymind/LSFloatingActionMenu
LSFloatingActionMenu is floating action button component of material design for iOS. - tinymind/LSFloatingActionMenu
github.com
[self showMenuFromButton:sender withDirection:LSFloatingActionMenuDirectionUp position:location];
Adding location field.
Add a flag to open once when The screen is clicked.
@property (nonatomic, assign) BOOL singTap2OpenFloatingMenu;
-(void)tapDetected:(UITapGestureRecognizer *)sender{
.
.
.
if(_singTap2OpenFloatingMenu) {
[self showMenuFromButton:sender withDirection:LSFloatingActionMenuDirectionUp position:location];
_singTap2OpenFloatingMenu = false;
}
Making a button to be disabled.
To add logs.
} closeHandler:^{
[self.actionMenu removeFromSuperview];
self.actionMenu = nil;
// button.hidden = NO;
NSLog(@"menu is closed");
}];
calculating the position to the point of touch.
self.actionMenu.startPoint = position; //button.center;
NSLog(@"position %f %f", position.x, position.y);
Adding a menu on the image.
// [self.view addSubview:self.actionMenu];
[myImage addSubview:self.actionMenu];
self.actionMenu = [[LSFloatingActionMenu alloc] initWithFrame:self.view.bounds direction:direction menuItems:menus menuHandler:^(LSFloatingActionMenuItem *item, NSUInteger index) {
NSLog(@"Click at index %d", (int)index);
whoops!
only the self.view is able to get the index.
'HJH IT Logs' 카테고리의 다른 글
시장은, 고객은 전문가들을 원하는 게 아니다 (0) | 2020.06.23 |
---|---|
딥러닝 엔진 순위 (0) | 2020.06.23 |
IITP 평가위원 자문위원 모집 (0) | 2020.06.22 |
의료쪽 기획 (0) | 2020.06.22 |
Short thoughts on the ripple effect. (0) | 2020.06.20 |
최근댓글