Skip to content

Instantly share code, notes, and snippets.

@exclusiveTanim
Created May 25, 2014 05:35
Show Gist options
  • Select an option

  • Save exclusiveTanim/00d3ba474945c1065c6d to your computer and use it in GitHub Desktop.

Select an option

Save exclusiveTanim/00d3ba474945c1065c6d to your computer and use it in GitHub Desktop.
Circle View Creation
/*By the following code we can create circle view*/
var win = Ti.UI.createWindow();
var shapeSize = 300;
var shapeRadius = shapeSize *0.5;
var shapeResizeH = shapeSize *0.7;
var shapeResizeW = shapeSize* 0.7;
var view = Ti.UI.createView({
width:shapeSize,
height:shapeSize,
borderRadius:shapeRadius,
backgroundColor:'green'
});
var lbl = Ti.UI.createLabel({
width:shapeResizeW,
height:shapeResizeH,
wordWrap:true,
textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,
text:'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut nec diam malesuada, tincidunt mauris sed, eleifend tortor. Donec vulputate, risus at pretium fermentum',
color:'red',
// borderColor:'white'
});
view.add(lbl);
win.add(view);
win.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment