iOS 仿QQ右上角弹框选项

更新了跳转崩溃的问题。

_以前在Github上上传个一个版本,后来居然有人给我点了几颗星,给我激动的不得了,然后这几天没事儿,就想着完善一下,然后就优化了一下只希望能够帮助你们,代码水平一般,欢迎吐槽_

使用方法:

1.导入两个文件(FKGPopOption.h&&.m)

2.在需要的地方添加如下代码:
点击这里下载源码

// 由convertRect: toView 获取到屏幕上该控件的绝对位置。
UIWindow *window = [[UIApplication sharedApplication].delegate window];
CGRect frame = [optionButton convertRect:optionButton.bounds toView:window];

FKGPopOption *s = [[FKGPopOption alloc] initWithFrame:self.view.bounds];
s.option_optionContents = @[@"首页", @"个人中心", @"问题一箩筐", @"任务管理",@"有奖问答"];
s.option_optionImages = @[@"select1",@"select2",@"select3",@"select4",@"select5"];

// 使用链式语法直接展示 无需再写 [s option_show];
[[s option_setupPopOption:^(NSInteger index, NSString *content) {
    NSLog(@"你选中了第%ld行 选项为:%@", index, content);
} whichFrame:frame animate:YES] option_show];

iOS 仿QQ右上角弹框选项_第1张图片

源码下载地址: https://github.com/forkingghost/FKGPopSelected
我的第二篇,希望能帮助到大家

你可能感兴趣的:(iOS 仿QQ右上角弹框选项)