6965456

所属分类:操作系统开发
开发工具:Objective-C
文件大小:23KB
下载次数:3
上传日期:2013-12-06 11:34:50
上 传 者fdafdafda
说明:  横向滚动的label,精选ios编程学习源码,很好的参考资料。
(Transverse rolling label, select learning IOS programming source code, a good reference.)

文件列表:
MarqueeLabel.h (5814, 2012-06-02)
MarqueeLabel.m (23572, 2012-06-02)
MarqueeLabelDemo (0, 2012-06-02)
MarqueeLabelDemo\Classes (0, 2012-06-02)
MarqueeLabelDemo\Classes\MarqueeLabelDemoAppDelegate.h (535, 2012-06-02)
MarqueeLabelDemo\Classes\MarqueeLabelDemoAppDelegate.m (2756, 2012-06-02)
MarqueeLabelDemo\Classes\MarqueeLabelDemoViewController.h (1502, 2012-06-02)
MarqueeLabelDemo\Classes\MarqueeLabelDemoViewController.m (6860, 2012-06-02)
MarqueeLabelDemo\main.m (372, 2012-06-02)
MarqueeLabelDemo\MainWindow.xib (20117, 2012-06-02)
MarqueeLabelDemo\MarqueeLabelDemo-Info.plist (909, 2012-06-02)
MarqueeLabelDemo\MarqueeLabelDemo.xcodeproj (0, 2012-06-02)
MarqueeLabelDemo\MarqueeLabelDemo.xcodeproj\project.pbxproj (12786, 2012-06-02)
MarqueeLabelDemo\MarqueeLabelDemoViewController.xib (11363, 2012-06-02)
MarqueeLabelDemo\MarqueeLabelDemo_Prefix.pch (201, 2012-06-02)

MarqueeLabel ============ ## Description MarqueeLabel is a functional equivalent to UILabel that adds a scrolling marquee effect when the text of the label outgrows the available width (for the given font size). All standard UILabel properties are available in MarqueeLabel and it behaves just like a UILabel. ### Usage MarqueeLabel supports moving the label at either a defined rate (points per second) or duration (seconds). The animation curve can also be defined, and defaults to `UIViewAnimationOptionCurveEaseInOut`. It also features a variable-length fade at the left and right side view borders, in order to fade the label text into the background rather than simply being chopped off. Import MarqueeLabel.h and replace your UILabels with MarqueeLabels. Replace: UILabel *lengthyLabel = [[UILabel alloc] initWithFrame:labelCGRectFrame]; With: MarqueeLabel *scrollyLabel = [[MarqueeLabel alloc] initWithFrame:labelCGRectFrame duration:8.0 andFadeLength:10.0f]; This creates a MarqueeLabel that will scroll across its content in 8.0 seconds, and adds 10.0 point long fade at the left and right boundaries. If you'd rather have a label that scrolls at a specific rate (points per second), instead of completing the scroll in a specific time frame, you can use this: MarqueeLabel *scrollyLabel = [[MarqueeLabel alloc] initWithFrame:labelCGRectFrame rate:50.0 andFadeLength:10.0f]; See the included MarqueeLabelDemo project for further example usage. ## Todo - Any ideas? ## About Charles Powell - [GitHub](http://github.com/cbpowell) - [Twitter](http://twitter.com/seventhcolumn) Give me a shout if you're using this in your project!

近期下载者

相关文件


收藏者