Code Monkey home page Code Monkey logo

mintannotationview's Introduction

MintAnnotationView

UITextViews with name highlight tag like Facebook

Introduction

Do you want to make UITextView like Facebook reply input? It implements annoate(tag) user and show tag rect. Additional, I maked UITextView for reply list that just show tag rects from annotation tag.

  • Appear tagged user from annotationList(NSArray)
  • Managed annotationList(It able to use write form)
  • Easy customize.

MintAnnotationMemoView

MintAnnotationChatView

(MintAnnotationChatView)

MintAnnotationMemoView

(MintAnnotationChatView)

How to use

Clone or Download and show projct. It's very simple.

MintAnnotationChatView

  1. If you use xib, Put UITextView on view and set class 'MintAnnotationChatView' else make 'MintAnnotationChatView' object and addSubView.
  2. SetDelegate
- (void)textViewDidChange:(UITextView *)textView
{
    // Checking User trying to remove MintAnnotationView's annoatation
    [self.annotationView checkTagDeleting];
    
}

- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
{
    // Checking User trying to edit MintAnnotationView's annoatation
    return [self.annotationView checkingEditingTag:textView andRange:range];
    
}
  1. Add Event anywhere(Ex. UserNameButtons) Make info dictionary include annotation info. And annotation:
NSMutableDictionary *info = [[NSMutableDictionary alloc] init];
[info setObject:@"0" forKey:MintAnnotationInfoID];
[info setObject:@"Mary" forKey:MintAnnotationInfoName];
[info setObject:@"Other user Information" forKey:@"others"];
[self.annotationView annotation:info];
  1. Getting annotation User List. Use it to post server.
self.annotationView.annotationList;
  1. Or Get Annoation tagged string.
[self.annotationView makeStringWithTag];

result

 hello<u id=12>mary</u>!!

MintAnnotationMemoView

  1. If you use xib, Put UITextView on view and set class 'MintAnnotationMemoView' else make 'MintAnnotationMemoView' object and addSubView.
  2. Call setAnnotationWithMemo:
NSString *firstMemo = @"<u uid=0>Mary</u> hi mary!!. I'm <u uid=1>Cloud</u>.";
[self.memo annotationWithMemo:firstMemo];

mintannotationview's People

Contributors

soleaf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.