8000 GitHub - diwu/DWLabel: A subclass of UILabel capable of touch events handling and displaying UIMenuController items.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

diwu/DWLabel

Repository files navigation

Copyright (c) 2012 Di Wu (http://diwublog.com/)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

DWLabel

DWLabel icon

Overview

DWLabel, a subclass of UILabel capable of touch events handling and displaying UIMenuController items. It's inspired by the UX of Weixin, the most popular mobile app in China developed by Tecent.

screenshot

How To Use

Drop the DWLabel .h and .m files into your own project. Try some code like this:

DWLabel *tmpDWLabel = [[DWLabel alloc] initWithFrame:CGRectMake(18, 0, 260, 54)];
self.dwLabel = tmpDWLabel;
[tmpDWLabel release];

Make sure you also implement the delete: and copy: method within the DWLabel implemention file.

Run it, try long press the label. And you are good to go. ;)

Twitter: @diwup

Blog: http://diwublog.com

About

A subclass of UILabel capable of touch events handling and displaying UIMenuController items.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0