How to insert UIImageView in UITextView in the same way that iphone default message (SMS) app uses to insert multimedia content in the UITextView

后端 未结 4 1181
Happy的楠姐
Happy的楠姐 2021-01-18 21:16

I want to insert UIImageView in UITextView of Toolbar having send and camera button in the same way as iPhone default SMS app do.

4条回答
  •  难免孤独
    2021-01-18 21:53

    I have one suggetion that try to make html file with image and text as per your requirements and load that html file into webview.

    Here you can also back some particular text Bold etc.

    I think nice look then textfield.

    To make webview just look like simple scroll view just put this method in your code

    don't forgot to write this

    webView.opaque = NO;,

    [self hideGradientBackground:webView]; and

    - (void) hideGradientBackground:(UIView*)theView
    {
        for (UIView * subview in theView.subviews)
        {
            subview.backgroundColor = [UIColor clearColor];
            if ([subview isKindOfClass:[UIImageView class]])
                subview.hidden = YES;
    
            [self hideGradientBackground:subview];
        }
    }
    

    I hope this may help you.

提交回复
热议问题