Skip to content

AmazonkaIV/SkadiControl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#SkadiControl by 12Rockets SkadiControl is a UIView-based component designed to support user interactions with a given UIView though rotating, scaling and moving. Given UIView can be an UIImage or some other subclassed UIView. This library is designed to be light-weight and addable to any view.

Changes by user interaction are communicated through delegate pattern while changing the SkadiControl is done by simply setting it's properties.

Preview


##Installing SkadiControl You can install SkadiControl in your project by simply copying source files from SkadiControl directory. Simply import SkadiControl in classes you wish to use it:

#import "SkadiControl.h"

##Creating a SkadiControl Creating a SkadiControl is as easy as creating a UIView.

In desired UIViewController:

[[SkadiControl alloc] initWithsuperview:self.skadiView controlsDelegate:self imageNamed:@"12rockets"]]

There are several constructors available, check the SkadiControl header file.

Note: There are two read-only variables in SkadiControl: minScale and maxScale which tells user what is the minimum and the maximum scale of the control. These variables are different for the different views which the control is holding.


##Features

###Setting Selection SkadiControl can be selected or deselected by setting the selected property.

[skadiControl isComponentSelected];
[skadiControl setSelected:YES];

###Setting Rotation Angle SkadiControl's rotation angle can be set by changing rotationAngle property.

[skadiControl setRotationAngle:value];

###Setting Scale Factor SkadiControl's scale can be set by changing scale property.

[skadiControl setScale:value];

###Setting Center SkadiControl's center can be set by changing controlCenter property.

[skadiControl setControlCenter:newCenter];

###Setting Custom Control Buttons SkadiControl's control buttons can be set by calling setAssetsWithNameForConfirm: forRotation: forScaling: andForDeletion:.

[skadiControl  setAssetsWithNameForConfirm:@"skadi-confirm-green"
                               forRotation:@"skadi-rotate-green"
                                forScaling:@"skadi-scale-green"
                            andForDeletion:@"skadi-delete-green"];

####SkadiControl Protocol SkadiControl should have delegate which will be notified when user interacts with the control.

@protocol SkadiControlDelegate

- (void)skadiControlDidSelect:(id)sender;
- (void)skadiControlWillRemove:(id)sender;
- (void)skadiControlDidConfirm:(id)sender;
- (void)skadiControlDidScale:(id)sender;
- (void)skadiControlDidRotate:(id)sender;
- (void)skadiControlDidTranslate:(id)sender;

@end

##Credit Designed and Developed by 12Rockets:

###Development


##Feedback Send us your feedback at hello@12rockets.com or hit us up on Twitter.


##License SkadiControl is available under the MIT license. See the LICENSE file for more info.

About

A light-weight UIView component which gives user ability to manipulate with given UIView. Developed by

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 100.0%