在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:aryaxt/iOS-Rich-Text-Editor开源软件地址:https://github.com/aryaxt/iOS-Rich-Text-Editor开源编程语言:Objective-C 99.5%开源软件介绍:RichTextEditor-iOSRichTextEditor for iPhone & iPad Features:
Custom Font Size SelectionFont size selection can be customized by implementing the following data source method - (NSArray *)fontSizeSelectionForRichTextEditor:(RichTextEditor *)richTextEditor
{
// pas an array of NSNumbers
return @[@5, @10, @20, @30];
} Custom Font Family SelectionFont family selection can be customized by implementing the following data source method - (NSArray *)fontFamilySelectionForRichTextEditor:(RichTextEditor *)richTextEditor
{
// pas an array of Strings
// Can be taken from [UIFont familyNames]
return @[@"Helvetica", @"Arial", @"Marion", @"Papyrus"];
} Presentation StyleYou can switch between popover, or modal (presenting font-picker, font-size-picker, color-picker dialogs) by implementing the following data source method - (RichTextEditorToolbarPresentationStyle)presentarionStyleForRichTextEditor:(RichTextEditor *)richTextEditor
{
// RichTextEditorToolbarPresentationStyleModal Or RichTextEditorToolbarPresentationStylePopover
return RichTextEditorToolbarPresentationStyleModal;
} Modal Presentation StyleWhen presentarionStyleForRichTextEditor is a modal, modal-transition-style & modal-presentation-style can be configured - (UIModalPresentationStyle)modalPresentationStyleForRichTextEditor:(RichTextEditor *)richTextEditor
{
return UIModalPresentationFormSheet;
}
- (UIModalTransitionStyle)modalTransitionStyleForRichTextEditor:(RichTextEditor *)richTextEditor
{
return UIModalTransitionStyleFlipHorizontal;
} Customizing FeaturesFeatures can be turned on/off by iplementing the following data source method - (RichTextEditorFeature)featuresEnabledForRichTextEditor:(RichTextEditor *)richTextEditor
{
return RichTextEditorFeatureFont |
RichTextEditorFeatureFontSize |
RichTextEditorFeatureBold |
RichTextEditorFeatureParagraphIndentation;
} Enable/Disable RichText ToolbarYou can hide the rich text toolbar by implementing the following method. This method gets called everytime textView becomes first responder. This can be usefull when you don't want the toolbar, instead you want to use the basic features (bold, italic, underline, strikeThrough), thoguht the UIMeMenuController - (BOOL)shouldDisplayToolbarForRichTextEditor:(RichTextEditor *)richTextEditor
{
return YES;
} Enable/Disable UIMenuController OptionsOn default the UIMenuController options (bold, italic, underline, strikeThrough) are turned off. You can implement the follwing method if you want these features to be available through the UIMenuController along with copy/paste/selectAll etc. - (BOOL)shouldDisplayRichTextOptionsInMenuControllerForRichTextrEditor:(RichTextEditor *)richTextEdiotor
{
return YES;
} CreditsiPhone popover by werner77 https://github.com/werner77/WEPopover |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论