[Self.lable setnumberoflines:0];
[Email protected] "In recent years, despite the beautiful trading data, but after a year of operation, Lao Wang found that speculation is still no profit space. He finally understand that house prices have lost the rise of the soil environment, mainly inventory of large inventories, the traditional enterprise survival difficult, the desire for young people to reduce housing, asset allocation to the capital market, "speculation has arrived at the end of the" [2006 to 2011, Wenzhou City, urban housing sales average price from 8045 yuan/ Square meters rose to 34674 yuan/square meters, 5 years time has risen 3 times times or so. Lao Wang said, wenzhou price per square meter from 10,000 yuan to 20,000 yuan, spent more than a year, from 20,000 yuan to 30,000 yuan, only a year less than. ][2009, Wenzhou, per capita GDP of only 4604 U.S. dollars, in Zhejiang Province ranked third, less than half of Hangzhou, Zhejiang Province, only 71% of GDP per capita. ]";
Self.lable.backgroundcolor=[uicolor Graycolor];
Set paragraph style
Nsmutableparagraphstyle *par=[[nsmutableparagraphstyle Alloc]init];
par.lineheightmultiple=nslinebreakbycharwrapping;
Set paragraph font style
Nsdictionary *[email protected]{nsfontattributename:self.lable.font,nsparagraphstyleattributename:par.copy};
Calculates the actual size of the lable returns the area where the text is drawn
CGRect rect=[self.lable.text Boundingrectwithsize:cgsizemake (Self.view.frame.size.width, Self.view.frame.size.height) Options:nsstringdrawinguseslinefragmentorigin Attributes:dic Context:nil];
Set the distance of the label to the top of the screen
Self.lable.frame=cgrectmake (0, Rect.size.width, rect.size.height);
[Self.view addSubview:self.lable];
iOS label self-applicable size