【问题标题】:Message Bubble UILabel for making an interactive appMessage Bubble UILabel 用于制作交互式应用程序
【发布时间】:2011-05-26 22:09:43
【问题描述】:

我想要一个这样的 UILabel。我在哪里可以找到一个?

【问题讨论】:

    标签: iphone objective-c xcode uiview uilabel


    【解决方案1】:

    使用气泡图像创建一个图像视图。添加一个uilabel作为imageview的子视图并定位它。

    UIImageView *imgv = [[UIImageView alloc]initWithFrame:CGRectMake(0,0,100,100)];
    imgv.image = [UIImage imageNamed:@"bubble.png"];
    

    //将标签定位到imageview的中心

    UILabel *lbl = [[UILabel alloc]initWithFrame:CGRectMake(20,30,60,40)];
    [imgv addSubview:lbl];
    [lbl release];
    
    [self.view addSubview:imgv];
    [imgv release];
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-04-30
      • 2020-07-01
      • 1970-01-01
      • 2013-11-14
      • 2012-04-08
      • 2012-02-20
      • 2014-10-30
      • 2021-08-04
      相关资源
      最近更新 更多