nnhubbard / ZSSRichTextEditor

A beautiful rich text WYSIWYG editor for iOS with a syntax highlighted source view
MIT License
3.78k stars 584 forks source link

How to use this in Swift #170

Open bharathreddy-97 opened 7 years ago

bharathreddy-97 commented 7 years ago

How can i use this in swift? which headers should i add to bridging header?

Mehul18292 commented 7 years ago

#import "ZSSRichTextEditor.h"

Adding above line is enough for having it in swift.

JeromeTW commented 6 years ago

If you using cocoapod, the line will be #import "ZSSRichTextEditor/ZSSRichTextEditor.h"

JeromeTW commented 6 years ago

After testing, I found that framework from cocoapod is different from sample's framework. It miss a lot of functions. So manually using ZSSRichTextEditor is a better choice.

manually using ZSSRichTextEditor in swift steps: 1.Copy the Source folder to your project. 2.add the line #import "ZSSRichTextEditor.h" in your bridging header 3.configure Build Phases like following screenshot:

2017-10-31 9 27 54 2017-10-31 9 28 16 2017-10-31 9 28 32

kodekarim commented 1 year ago

here is the implementation in swift link, u can use Coordinator to use it in swiftUI