Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 1018 Bytes

README.md

File metadata and controls

43 lines (32 loc) · 1018 Bytes

TiCornerRadius

Inspired by iphone - how to set cornerRadius for only top-left and top-right corner of a UIView? - Stack Overflow. for Titanium app.

screenshot.png

Install

Compiled module download

Usage

You can see screenshot's example at example/app.js.

var TiCornerRadius = require('be.k0suke.ticornerradius');
var view = Ti.UI.createView({
	width: 80,
	height: 80,
	backgroundColor: '#000',
	cornerRadius: {
		corners: TiCornerRadius.CORNER_TOP_LEFT | TiCornerRadius.CORNER_TOP_RIGHT,
		radii: {
			width: 20,
			height: 20
		},
		border: {
			width: 1,
			color: '#f00'
		}
	}
});

Properties

  • cornerRadius.corners / CORNER_TOP_LEFT or CORNER_TOP_RIGHT or CORNER_BOTTOM_LEFT / CORNER_BOTTOM_RIGHT / CORNER_ALL_CORNERS
  • cornerRadius.radii.width / height
  • cornerRadius.border.width / color

License

The MIT License (MIT) Copyright (c) 2014 Kosuke Isobe