Skip to content
 
 

Latest commit

 

History

82 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Mica Mica is a light library for IOS.

Version 0.2.0

##Requirements This is tested against IOS 6.0+ and uses ARC.

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

##Architecture

  • MCUI
    • UIColor+MCColor
    • UILabel+MCLabel
    • UITextField+MCTextField
    • UITextView+MCTextView
  • MCUtilities
    • NSNumber+MCNumber
    • NSString+MCString

##Document ###Parameters File You can define the MC_PARAMETERS_FILE variability in Mica.h file. The parameers file architecutre is Parameters File Screenshot

###MCUI ####Create UIColor Object with HEX Value

+ (UIColor *)colorFromHEX:(NSString *)hexStr;

**Parameters**
`hexStr`: The HEX Value. If only include r/g/b color value, alpha value will be 1.0.

**Return Value**
return UIColor Object.

**Example**
```objective-c [UIColor colorFromHEX:@"d90070"] ```

####Create UIColor Object from Parameters File

+ (UIColor *)colorFromPlistWithKey:(NSString *)key;

**Parameters**
`key`: The parameters file key value. It must be the subkey of Color.

**Return Value**
return UIColor Object.

**Example**
```objective-c [UIColor colorFromPlistWithKey:@"PinkColor"] ```

####Create UILabel Object from Parameters File

+ (UILabel *)labelFromPlistWithKey:(NSString *)key;

**Parameters**
`key`: The parameters file key value. It must be the subkey of Label.

  • FontSize The points of label text's font size.
  • Bold If it is YES, the font of text will be rendered in boldface else standard face.
  • TextColor The font color of text. It shoud be HEX String or Color property.
  • BackgroundColor The background color of label. If it is empty, the background color will be [UIColor clearColor]
  • Border
    • Color The color of label's border color. It shoud be HEX String or Color property.
    • Width The width of label's border width.
  • CornerRadius The label's layer corner radius.


**Return Value**
return UILabel Object.

**Example**
```objective-c [UILabel labelFromPlistWithKey:@"Title"] ```

####Create UITextField Object from Parameters File

+ (UITextField *)textfieldFromPlistWithKey:(NSString *)key;

**Parameters**
`key`: The parameters file key value. It must be the subkey of TextField.

  • FontSize The points of TextField text's font size.
  • Bold If it is YES, the font of text will be rendered in boldface else standard face.
  • TextColor The font color of text. It shoud be HEX String or Color property.
  • BackgroundColor The background color of TextField. If it is empty, the background color will be [UIColor clearColor]
  • Border
    • Color The color of label's border color. It shoud be HEX String or Color property.
    • Width The width of label's border width.
  • CornerRadius The label's layer corner radius.
  • ShowClearButton If it is YES, TextField will display clear button when UITextFieldViewModeWhileEditing.


**Return Value**
return UITextField Object.

**Example**
```objective-c [UITextField textfieldFromPlistWithKey:@"Signup"] ```

####Create UITextView Object from Parameters File

+ (UITextView *)textviewFromPlistWithKey:(NSString *)key;

**Parameters**
`key`: The parameters file key value. It must be the subkey of TextView.

  • FontSize The points of text's font size.
  • Bold If it is YES, the font of text will be rendered in boldface else standard face.
  • TextColor The font color of text. It shoud be HEX String or Color property.
  • BackgroundColor The background color of TextView. If it is empty, the background color will be [UIColor clearColor]
  • Border
    • Color The color of TextView's border color. It shoud be HEX String or Color property.
    • Width The width of TextView's border width.
  • CornerRadius The TextView's layer corner radius.
  • ShowClearButton If it is YES, TextView will display clear button.
  • ScrollEnabled If it is YES, TextView will enable scrolling.


**Return Value**
return UITextView Object.

**Example**
```objective-c [UITextView textviewFromPlistWithKey:@"Normal"] ```

##Author Created by Hiseh
GitHub

About

Mica

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages