Skip to content

Textview Images is a Category on textview that enables functionality of selecting images in textview.

License

Notifications You must be signed in to change notification settings

ibhupi/TextviewImages

Repository files navigation

UITextview Images

UITextview Images is a Category on textview that enables functionality of selecting images in textview.

UITextview Images Example

Download this project and run it to see how easy it is to do that.

Usage Podfile

platform :ios, '7.0'
pod 'TextviewImages', :git => 'git@github.com:ibhupi/TextviewImages.git'

How to use example

To add image select option menu in text view just writing these two lines of code is enough. Add following in your View Controller or Class which has outlet or refresh to UITextView.

#import "UITextView+Helper.h"
[self.textView addSelectImageMenuText:@"🌅 📷"];

Actual method to call

/**
 * Add menu item option to select image. 
 * When user will tap on this it will ask user to select image source as camera roll or camera.
 * @param selectImageMenuText, NSString menu text to show option to select image
 */
- (void)addSelectImageMenuText:(NSString *)selectImageMenuText;

Screenshots

Screen with Long tap to select images
creen with Long tap to select images<

Alert to select image source type when there is only one option in menu to select images
image source type

Screen when showing images to select
showing images to select

Screen after image is selected and added in text view. And ready to select more images
image is selected and added in text view

Sample code to be used in main project to add functionality in text view that can provide option to select images either from Camera Roll & Album or Camera or Both .

- (void)viewDidLoad
{
    [super viewDidLoad];
    [self.textView addSelectImageMenuText:@"🌅 📷"]; // Yes you can add emojis if you want.
}

About

Textview Images is a Category on textview that enables functionality of selecting images in textview.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published