If ([_info[@ "CashBack"] Floatvalue] > 0) {
Y + = 10.0;
// Check-out amount Description
uilabel * Cashbacklabel = [triplabelfactory createlabelwithtext :[[nsstring stringwithformat :@ " return ¥%0.2f" ,[ _info[@ "CashBack" ] Floatvalue]/100.0 hotelpriceformat /span>
color:label_red
fontSize:ten
labelstyle:labelstylesolid];
cgsize labeltextsize = [Cashbacklabel. Text calculatesizewithfont: Cashbacklabel. Font];
Text = [[nsstring stringwithformat:@ " check-in and return ¥%0.2f credit stay hotel red envelopes ",[_info< Span class= "S3" >[@ "CashBack" ] floatvalue]/< Span class= "S4" >100.0 hotelpriceformat;
size = [text Calculatesizewithfont:text_font Constrainedtosize:cgsizemake ([uiscreen< Span class= "S3" > mainscreen]. Bounds. Size. Width-15.0-5.0- Cashbacklabel. width1000
if (!onlyheight) {
// Draw labels
[label_red set];
cgcontextref context5 = uigraphicsgetcurrentcontext(); // Set context
cgcontextsetlinewidth(CONTEXT5, 1.0);
Cgcontextsetrgbstrokecolor(CONTEXT5, 0.8, 0.1, 0.8, 1);
cgcontextfillrect(CONTEXT5, cgrectmake(x, y+ (size). Height-cashbacklabel. Height)/2.0, Cashbacklabel. Width, Cashbacklabel. Height));
// draw label copy
[[uicolor whitecolor set];
[Cashbacklabel. drawinrect:cgrectmake (x+ (Cashbacklabel. Width-labeltextsize. Width/2.0-cashbacklabel. Height/2.0 Width Height withfont:cashbacklabel. Font
[title_text_color set];
[Text drawinrect:cgrectmake(X+cashbacklabel. Width+5.0, y, size. Width, size. Height) withfont:text_font];
}
Y + = size. height;
}
DrawRect Way to draw labels