Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/domesticcatsoftware/MTQuadrantControl
A 4-way button disguised as a table cell, as seen in Tweetie 2
https://github.com/domesticcatsoftware/MTQuadrantControl
Last synced: 3 months ago
JSON representation
A 4-way button disguised as a table cell, as seen in Tweetie 2
- Host: GitHub
- URL: https://github.com/domesticcatsoftware/MTQuadrantControl
- Owner: domesticcatsoftware
- Created: 2011-05-12T01:23:10.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-05-12T01:33:05.000Z (over 13 years ago)
- Last Synced: 2023-10-20T19:24:35.376Z (over 1 year ago)
- Language: Objective-C
- Homepage: http://mattt.me
- Size: 597 KB
- Stars: 15
- Watchers: 3
- Forks: 33
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
- awesome - MTQuadrantControl - A 4-way button disguised as a table cell, as seen in Tweetie 2 (etc)
- awesome - MTQuadrantControl - A 4-way button disguised as a table cell, as seen in Tweetie 2 (etc)
README
MTQuadrantControl
=================## A 4-way button disguised as a table cell, as seen in Tweetie 2
![Screenshot of MTQuadrantControl](http://mattt.github.com/MTQuadrantControl/screenshot.png "MTQuadrantControl Screenshot")
## Demo
After cloning the repository, open the Xcode Project file /MTQuadrantControl/Example/Nitwit.xcodeproj. Build and Run in the iPhone Simulator to see it in action. The specified quadrant actions are stubbed out as an example.
## Usage
Initialize as follows in a UITableViewController or subclass (works best with table views with a grouped style):
MTQuadrantControl * quadrantControl = [[[MTQuadrantControl alloc] initWithFrame:CGRectMake(10, 20, 300, 90)] autorelease];
quadrantControl.delegate = self;
[quadrantControl setNumber:[NSNumber numberWithInt:127]
caption:@"following"
action:@selector(didSelectFollowingQuadrant)
forLocation:TopLeftLocation];
[quadrantControl setNumber:[NSNumber numberWithInt:1728]
caption:@"tweets"
action:@selector(didSelectTweetsQuadrant)
forLocation:TopRightLocation];
[quadrantControl setNumber:[NSNumber numberWithInt:352]
caption:@"followers"
action:@selector(didSelectFollowersQuadrant)
forLocation:BottomLeftLocation];
[quadrantControl setNumber:[NSNumber numberWithInt:61]
caption:@"favorites"
action:@selector(didSelectFavoritesQuadrant)
forLocation:BottomRightLocation];
[self.tableSectionFooterView addSubview:quadrantControl];- number - the number displayed at top
- caption - the text displayed below the number
- action - a selector to be performed by the delegate
- location - the specified quadrant to set these values and action for ([TopLeftLocation|TopRightLocation|BottomLeftLocation|BottomRightLocation])## Requirements
- iPhone OS 3.0 or higher
- QuartzCore framework## Issues
In its current release, the horizontal and vertical dividing lines in the quadrant control appear to be drawing between pixel boundaries. If you are handy with CoreGraphics and can fix this, I would greatly appreciate it.
## License
MTQuadrantControl is licensed under the MIT License:
Copyright (c) 2010 Mattt Thompson (http://mattt.me/)
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.
## CreditInspired entirely by the amazing [Tweetie 2 for iPhone](http://www.atebits.com/tweetie-iphone/), by [atebits](http://www.atebits.com/)