iOS 切换视图 DVSwitch

软件介绍

DVSwitch 是可定制的,基于 UISwitch 和 UISegmentedControl 的控件,使用 Objective-C 编写。

DVSwitch 灵感来源于 UISwitch 和 UISegmentedControl,目标如下:

  • 简单定制非常漂亮的动画控件

  • 支持拖动或者点击交互

  • 启动要求非常低 ,不需要图片

  • 漂亮的字体颜色效果

  • 基于项数值自动调节

使用

DVSwitch *switcher = [[DVSwitch alloc] initWithStringsArray:@[@"First", @"Second"]];
switcher.frame = CGRectMake(20, 60, self.view.frame.size.width - 40, 34);
[self.view addSubview:switcher];
[switcher setPressedHandler:^(NSUInteger index) {

    NSLog(@"Did switch to index: %lu", (unsigned long)index);

}];
[self.view addSubview:switcher];

可定制属性:

  • UIColor *backgroundColor - color of the controls background

  • UIColor *sliderColor - color of slider

  • UIColor *labelTextColorInsideSlider - color of text when slider hovers over it

  • UIColor *labelTextColorOutsideSlider - color of text when outside of slider

  • UIFont *font - font used in control

  • CGFloat cornerRadius - corner radius of control and corner radius of slider

  • CGFLoat sliderOffset - pixel offset in points between the slider and the edge of control




本文地址:https://codercto.com/soft/d/8892.html

腾讯方法

腾讯方法

潘东燕、王晓明 / 机械工业出版社 / 2014-12-11 / 39.00

这是国内第一本深度讲述腾讯产品研发与团队转型的书。本书介绍了腾讯三个不同生命周期的产品的开发过程,包括如何踏足新领域开发新产品;如何救活一个即将半路夭折的产品;如何让一个老产品持续盈利。本书呈现了互联网产品开发时会遇到普遍问题和解决方法,涉及大企业如何内部创业,并迅速组建新的项目团队;如何实现跨部门的合作;在面临新团队和紧急开发任务时如何提高团队沟通效率;在产品研发方面,如何定位产品、如何敏捷开发......一起来看看 《腾讯方法》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具