NewsBlur/clients/ios/Classes/StoryTitleAttributedString.h
Nicholas Riley dc6742b8c0 Improve story drag and drop on iPad.
Provide (in descending priority order):

1. an StoryTitleAttributedString object which provides attributed string containing the (optional) image and a link, for drops into apps such as Notes, or if rich text is unsupported, Story Title <story URL>.

2. a URL (alone)

This avoids the issue where a “2” or “3” is displayed and multiple items appear to be being dragged (see #1072).

Correctly return an empty array rather than nil if we have nothing to drag.
2018-01-06 13:35:20 -05:00

19 lines
445 B
Objective-C

//
// StoryTitleAttributedString.h
// NewsBlur
//
// Created by Nicholas Riley on 1/6/2018.
// Copyright © 2018 NewsBlur. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface StoryTitleAttributedString : NSObject <NSItemProviderWriting>
{
NSAttributedString *attributedString;
NSString *plainString;
}
- (instancetype)initWithAttributedString:(NSAttributedString *)attrStr plainString:(NSString *)plainStr;
@end