Giter VIP home page Giter VIP logo

ringview's Introduction

RingView

The RingView is a view used to select one from a large number of items.

Scroll bars are commonly used for the purpose. But scrolling takes long when there are a lot of items. Instead of scrolling, users can control the RingView by pan gestures. Pan gestures from the inside of the ring to the outside change the scale of the RingView and users can zoom in the destination items.

The RingView is based on the paper by Koshizawa et al [1�]__ although the details of the implementation are different because of the optimizations for touchscreens.

Supported Platforms

  • iOS 4.3 and later

How to Use

iOS

Put the following files into your project.

  • iOS/RingView/KUIRingView.h
  • iOS/RingView/KUIRingView.m

The KUIRingView class can be used like the UITableView class. As the UITableView needs the UITableViewDataSource and the UITableViewDelegate, the KUIRingView needs the KUIRingViewDataSource and the KUIRingViewDelegate.

The following is the typical code to use the KUIRingView.

#import "KUIRingView.h"

@interface ViewController : UIViewController <KUIRingViewDelegate, KUIRingViewDataSource>
@property (nonatomic, strong) IBOutlet KUIRingView *ringView;
...
@end

@implementation KUIViewController

- (void)viewDidLoad {
    [super viewDidLoad];
	
	self.ringView.delegate = self;
	self.ringView.dataSource = self;
}

- (NSUInteger)ringViewNumberOfItems:(KUIRingView *)ringView {
	...
	return numberOfItems;
}

- (KUIRingViewItem *)ringView:(KUIRingView *)ringView itemAtIndex:(NSUInteger)index {
	...
	return return [[KUIRingViewItem alloc] initWithTitle:title];
}

- (void)ringView:(KUIRingView *)ringView didSelectItemAtIndex:(NSUInteger)index {
	...
}

...

@end

How to Execute the Sample

iOS

  1. Open the Xcode project.
  2. Chose "Samples" as the build target.
  3. Run the project.

License

MIT License. Read the LICENSE file.

References

  1. Koshizawa, Y., Hiura, S. and Sato, K. : "Design and Evaluation of Pointing Interfaces for Selecting from Multiple Targets," Interaction 2008 (Japanese)

ringview's People

Contributors

koher avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.