Skip to content

Commit

Permalink
使用SFSafariViewController在应用内浏览原文
Browse files Browse the repository at this point in the history
  • Loading branch information
daiming committed Sep 5, 2016
1 parent 0b75d90 commit 793a708
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
14 changes: 3 additions & 11 deletions GCDFetchFeed/GCDFetchFeed/SMArticleViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#import "SMArticleViewController.h"
#import "Masonry.h"
#import <DTCoreText/DTCoreText.h>
#import <SafariServices/SafariServices.h>

#import "SMFeedStore.h"
#import "SMCellViewImport.h"
Expand Down Expand Up @@ -112,17 +113,8 @@ - (void)share {
- (void)linkClicked:(DTLinkButton *)button {
NSURL *URL = button.URL;

if ([[UIApplication sharedApplication] canOpenURL:[URL absoluteURL]])
{
[[UIApplication sharedApplication] openURL:[URL absoluteURL]];
}
else
{
if (![URL host] && ![URL path])
{
//无效链接情况
}
}
SFSafariViewController *sfVC = [[SFSafariViewController alloc] initWithURL:[URL absoluteURL]];
[self presentViewController:sfVC animated:YES completion:nil];
}
//链接长按
- (void)linkLongPressed:(UILongPressGestureRecognizer *)gesture {
Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
# Done:
* RSS解析成可用model
* dispatch_group监听多feeds的fetch
* 首页列表展示
* feed列表页
* 多行标题viewmodel里算cell高
* 时间显示
* 作者信息
* 分类显示
* Html convert to Core Text
* feed详情页
* FMDB本地存储 feed
Expand Down

0 comments on commit 793a708

Please sign in to comment.