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.
'Python' 카테고리의 다른 글
AppStore 수출 규정 (2) | 2020.09.03 |
---|---|
iOS 13 버전 대응 Push 라이브러리 패치 내용 (5) | 2020.08.24 |
마지막 오늘의 무료 앱 (0) | 2019.04.01 |
앱스토어 무료 앱 31일 (0) | 2019.03.31 |
앱스토어 무료 앱 30일 (0) | 2019.03.31 |
최근댓글