ios - Objective-c : Designing UIView/UILabel Programmatically -


i want design uiview/uilabel image programmatically in objective c. specially edge in middle . can ?

enter image description here

currently have :

uilabel *mylabel = [[uilabel alloc] initwithframe:cgrectmake(self.tabposition.x,self.tabposition.y,120,20)]; //or whatever size need             mylabel.center = self.tabposition;             [mylabel setfont:[uifont systemfontofsize:12]];             mylabel.backgroundcolor = [[uicolor blackcolor] colorwithalphacomponent:0.6f];             mylabel.textcolor = [uicolor whitecolor];             mylabel.textalignment = nstextalignmentcenter;             mylabel.text = [nsstring stringwithformat:@"%@  %@",data.user.firstname,data.user.lastname] ;             mylabel.tag = indexpath.row;             mylabel.userinteractionenabled = yes;              uipangesturerecognizer *gesture = [[uipangesturerecognizer alloc]                                                initwithtarget:self                                                action:@selector(labeldragged:)] ;             [mylabel addgesturerecognizer:gesture];               [self.picture addsubview:mylabel]; 

which giving me :
enter image description here

a lot of answers available, choose fits you:

basic , simplest

arrow , round corner

creative solution

hope these !!


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -