How to draw a “speech bubble” on an iPhone?

后端 未结 11 1186
礼貌的吻别
礼貌的吻别 2020-11-29 16:34

I\'m trying to get a \"speech bubble\" effect similar to the one in Mac OS X when you right click on something in the dock. Here\'s what I have now:

11条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-29 17:17

    I would probably make the whole image (including the triangle) in Photoshop, and then display it on the screen at the appropriate time using the:

    CGRect myRect = CGRectMake(10.0f, 0.0f, 300.0f, 420.0f);
    UIImageView *myImage = [[UIImageView alloc] initWithFrame:myRect];
    [myImage setImage:[UIImage imageNamed:@"ThisIsMyImageName.png"]];
    myImage.opaque = YES;
    [self.view addSubview:myImage];
    [myImage release];
    

提交回复
热议问题