• Stars
    star
    787
  • Rank 57,444 (Top 2 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created over 11 years ago
  • Updated about 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An iOS UI control that allows you to build a circular menu by laying out buttons in a circle pattern adjusting from the number of buttons (1~6).

KYCircleMenu

A circle menu with toggling animation. And you can customize the number of buttons between (1 ~ 6).

This control is separated from iPokeMon (a PokéMon game on iOS with Location Based Service), you can take a look at the demo video how cool it is!

Usage

Designated Initializer

Use the designated initializer below to initialize the circle menu:

// |buttonCount| : count of buttons around (1<= x <=6)
// |menuSize| : size of menu
// |buttonSize| : size of buttons around
// |buttonImageNameFormat| : name format for button image
// |centerButtonSize| : size of center button
// |centerButtonImageName| : name for center button image
// |centerButtonBackgroundImageName| : name for center button background image
- (id)      initWithButtonCount:(NSInteger)buttonCount
                       menuSize:(CGFloat)menuSize
                     buttonSize:(CGFloat)buttonSize
          buttonImageNameFormat:(NSString *)buttonImageNameFormat
               centerButtonSize:(CGFloat)centerButtonSize
          centerButtonImageName:(NSString *)centerButtonImageName
centerButtonBackgroundImageName:(NSString *)centerButtonBackgroundImageName;

Button Action

Override the -runButtonActions: message to customize your button action:

- (void)runButtonActions:(id)sender {
  [super runButtonActions:sender];

  // Do buttons' action appropriately by |[sender tag]|
  // ...
}

Tags are defined like below:

TAG:        1       1   2      1   2     1   2     1 2 3     1 2 3
           \|/       \|/        \|/       \|/       \|/       \|/
COUNT: 1) --|--  2) --|--   3) --|--  4) --|--  5) --|--  6) --|--
           /|\       /|\        /|\       /|\       /|\       /|\
TAG:                             3       3   4     4   5     4 5 6

Navigation Bar

The default case is that the navigation bar is only shown in child views. If you want it to be shown with the circle menu together, add the macro below

#define KY_CIRCLEMENU_WITH_NAVIGATIONBAR 1

to your constatns.h or config.h, or any other files that are imported in your <Project>-Prefix.pch.


License

This code is distributed under the terms and conditions of the MIT license.

More Repositories

1

iPokeMon

PokéMon like game on iOS with Location Based Service.
Objective-C
430
star
2

ALAssetsLibrary-CustomPhotoAlbum

A nice ALAssetsLibrary category for saving images & videos into custom photo album.
Objective-C
404
star
3

KYArcTab

Arcuated tab view controller with toggleing animation, 2 ~ 4 tabs are enabled. What's more, you can swipe left or right to toggle the views.
Objective-C
243
star
4

pngcrush

It is a free, open source command-line utility for optimizing PNG image files ( batch script included ).
C
192
star
5

iPokeMon-Server

iPokeMon Server.
Python
122
star
6

UIBezierPath-Symbol

[DEPRECATED] Symbol extension for UIBezierPath class (UIBezierPath category).
Objective-C
115
star
7

MKMapView-ZoomLevel

MKMapView category with zoom level extension.
Objective-C
23
star
8

SLNTFS

A preference Pane that allow you to enable writing on NTFS disks via the Apple driver.
Objective-C
13
star
9

KYNearbyService

A service for nearby discovery and communication.
Swift
11
star
10

iPokeMon-Doc

All documents (including a paper) for iPokeMon development.
Shell
7
star
11

issues

Issues & workarounds.
6
star
12

YeNom

[Legacy] Project Page for YeNom - Accounting tool on iOS.
HTML
3
star
13

seek-seek-seek

A 3D maze game base on Ogre3d, Bullet Physics, OpenAL, CEGUI, etc.
C++
2
star
14

KYUnlockCodeManager

Manage unlock codes (invitation code or free code) locally on client side only (iOS).
Objective-C
2
star
15

localhost-fake-server

Localhost fake servers
Python
2
star
16

RockPaper

Project page for RockPaper - A simple Rock Paper Scissors game on iOS.
Shell
2
star
17

templates4TeX

Some templates for TeX, LaTeX, ConTeXt, and related typesetting systems.
2
star
18

3d-path-search

A simple character auto path search demo that use Ogre3d & Micropather.
C++
2
star
19

Code-Compressor

A simple javascript & CSS code online compressor.
JavaScript
2
star
20

kjuly.github.com

Dev - Kjuly.com
CSS
2
star
21

GTMOAuth2

Lib for OAuth2 (unofficial).
Objective-C
1
star
22

KYProjectPageTheme

Project page theme.
JavaScript
1
star
23

iPokeMon-Resource

You can maintains all resources including PokeMon package here.
1
star
24

ios-exploration

A repository on some iOS learning tests.
Objective-C
1
star
25

dotvim

My vim configuration.
Vim Script
1
star
26

myoctheme

my octopress theme.
JavaScript
1
star
27

PhotoShop

Just a mirror of the PhotoShop v1.0 source code.
OpenEdge ABL
1
star
28

KYImageProcessor

The image processing foundation of KYPhotoPicker.
Swift
1
star
29

UDAExplainer

Sensitive user data access explainer, such as for Photo Library, Face ID, App Tracking Transparency, etc.
Swift
1
star
30

ColorCalculation

A color extension library for calculating hex, brightness, etc.
Swift
1
star
31

KYLogger

A local system logger for Apple platforms.
Swift
1
star
32

GPA-OC

A GPA (grade point average) online calculator.
PHP
1
star