Skip to content
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

根据程序的可读性、便捷性提出修改意见 #3

Merged
merged 1 commit into from
Apr 21, 2015

Conversation

JiaqiSun
Copy link
Contributor

更改方案:
1、MenuItem .h
修改了Item模型的初始化方法,因为index索引,是在PopMenu内部设置的,所有不需要暴露出来

  • (instancetype)initWithTitle:(NSString *)title iconName:(NSString *)iconName glowColor:(UIColor *)glowColor index:(NSUInteger)index NS_DEPRECATED_IOS(2_0,2_0);
    增加了一个init方法,和构造方法
  • (instancetype)initWithTitle:(NSString *)title iconName:(NSString *)iconName glowColor:(UIColor *)glowColor NS_AVAILABLE_IOS(2_0);
  • (instancetype)itemWithTitle:(NSString *)title iconName:(NSString *)iconName glowColor:(UIColor *)glowColor NS_AVAILABLE_IOS(2_0);
    2、 GlowImageView.h
    修改了.m中所有方法,将c语言方法,改成了OC方法,直接对图层操作,摒弃了Quartz2D技术
  • 增加了注释,提高程序的可读性和可交换性

1、MenuItem .h
修改了Item模型的初始化方法,因为index索引,是在PopMenu内部设置的,所有不需要暴露出来
- (instancetype)initWithTitle:(NSString *)title iconName:(NSString *)iconName  glowColor:(UIColor *)glowColor  index:(NSUInteger)index NS_DEPRECATED_IOS(2_0,2_0);
增加了一个init方法,和构造方法
- (instancetype)initWithTitle:(NSString *)title iconName:(NSString *)iconName glowColor:(UIColor *)glowColor NS_AVAILABLE_IOS(2_0);
+ (instancetype)itemWithTitle:(NSString *)title iconName:(NSString *)iconName glowColor:(UIColor *)glowColor NS_AVAILABLE_IOS(2_0);
2、 GlowImageView.h
修改了.m中所有方法,将c语言方法,改成了OC方法,直接对图层操作,摒弃了Quartz2D技术
3. 增加了注释,提高程序的可读性和可交换性
@YueLiXing
Copy link

建议把每行可以显示多少个item的设为成员属性,保留初始默认值,这样就有更高的可扩展性

@xhzengAIB
Copy link
Owner

@YueLiXing
你好!我miss了这个issue,你改动的地方比较多,我可以先看看吗?

@YueLiXing
Copy link

我改的地方不多,只改了PopMenu.m Line:123 这一个地方
perRowItemCount = 2
还有就是我发现我改完这个之后它不会自己居中了。。后来就没动其他的了

@xhzengAIB
Copy link
Owner

我记得之前是适配好的,为什么现在不行了呀?

@YueLiXing
Copy link

不行你自己试试,把那个3改成2,然后放四个item上去

@xhzengAIB
Copy link
Owner

不是不信,我测试一下,然后再来修复

@YueLiXing
Copy link

OK,我吃饭去了。。。

@xhzengAIB
Copy link
Owner

对了,您把光圈的效果改了吗?能呈现出来吗?

@YueLiXing
Copy link

没。。

@xhzengAIB
Copy link
Owner

image

@xhzengAIB
Copy link
Owner

貌似这是居中吧?

@xhzengAIB
Copy link
Owner

@YueLiXing

能否加个QQ一起聊一下?

@YueLiXing
Copy link

1223343444

@xhzengAIB xhzengAIB merged commit d5b1d77 into xhzengAIB:master Apr 21, 2015
@JiaqiSun
Copy link
Contributor Author

两位,那个光圈效果是我修改的。。。

@xhzengAIB
Copy link
Owner

@JiaqiSun
光圈效果已经弄好了!谢谢你的思路

@JiaqiSun
Copy link
Contributor Author

我还有个想法,就是能不能扩充几个item的位置,不能只是居中显示吧,希望多提供一些接口,这样的话,可扩展性会更高些

@YueLiXing
Copy link

我突然想到用 UIBezierPath 来画。。。。可扩展性会不会直接爆表。。。

@JiaqiSun
Copy link
Contributor Author

。。。。有点爆了。。感觉有点大材小用了,提供个扩展方法根据Frame,然后写几个常见的位置,用枚举貌似就完事了

@xhzengAIB
Copy link
Owner

@JiaqiSun
这块我还没遇到太多的细节,因为我用在两个项目上,大概都是居中了,要不这个你们两个细化一下?

Jack

@JiaqiSun
Copy link
Contributor Author

最近没时间呀。。我也在写另一个框架呢 。。。啥时候有时间了 我看看

@YueLiXing
Copy link

啊啊啊啊。。。俺们要换WebSocket聊天,我也有的忙了。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants