Skip to content

Commit

Permalink
Merge pull request #1 from ChenYilong/master
Browse files Browse the repository at this point in the history
update from origin
  • Loading branch information
jingchunYuan committed Oct 9, 2015
2 parents 3b41e07 + 7bf24cc commit 5712be7
Show file tree
Hide file tree
Showing 97 changed files with 4,249 additions and 31 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8121.17" systemVersion="15A178w" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8101.14"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
Expand All @@ -12,7 +12,7 @@
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015年 itcast. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015年 微博@iOS程序犭袁. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21"/>
<animations/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8121.17" systemVersion="15A178w" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="lGW-Ou-SFc">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="lGW-Ou-SFc">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8101.14"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<scenes>
Expand All @@ -20,7 +20,7 @@
<rect key="frame" x="0.0" y="22" width="600" height="80"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="XMq-4H-If0" id="3ZB-IX-KCp">
<rect key="frame" x="0.0" y="0.0" width="600" height="80"/>
<rect key="frame" x="0.0" y="0.0" width="600" height="79"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5Sd-Vr-3Tf">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@

@interface CYLNews : NSObject

@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *summary; //摘要
@property (nonatomic, copy) NSString *img;
@property (nonatomic, copy) NSString *sitename;
@property (nonatomic, assign) long addtime;
@property (nonatomic, copy) NSString *time;
@property (nonatomic, readonly, copy) NSString *title;
@property (nonatomic, readonly, copy) NSString *summary; //摘要
@property (nonatomic, readonly, copy) NSString *img;
@property (nonatomic, readonly, copy) NSString *sitename;
/*
*
之前写的是 long,但是4s-iOS9模拟器上会崩溃,暂时改成 int 类型
*
*/
@property (nonatomic, readonly, assign) int addtime;
@property (nonatomic, readonly, copy) NSString *time;

+ (instancetype)newWithDic:(NSDictionary *)dic;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ - (NSString *)time {
* 获取news对象所有的属性
*/
+ (NSArray *)getProperties {
return @[@"title",@"summary",@"img",@"sitename",@"addtime"];
return @[ @"title", @"summary", @"img", @"sitename", @"addtime" ];
}

- (NSString *)description{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

@interface CYLNewsCell ()

@property (weak, nonatomic) IBOutlet UILabel *titleView;
@property (weak, nonatomic) IBOutlet UILabel *summaryView;
@property (weak, nonatomic) IBOutlet UILabel *sitenameView;
@property (weak, nonatomic) IBOutlet UIImageView *imgView;
@property (weak, nonatomic) IBOutlet UILabel *addtimeView;
@property (nonatomic, weak) IBOutlet UILabel *titleView;
@property (nonatomic, weak) IBOutlet UILabel *summaryView;
@property (nonatomic, weak) IBOutlet UILabel *sitenameView;
@property (nonatomic, weak) IBOutlet UIImageView *imgView;
@property (nonatomic, weak) IBOutlet UILabel *addtimeView;

@end

Expand Down
87 changes: 86 additions & 1 deletion Demo3_iOS9URLScheme适配_引入白名单概念/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,89 @@ iOS 9 introduces LSApplicationQueriesSchemes to allow apps to query if other app

* Both TestA and TestB define a URL Scheme within their info.plist files
* TestA adds TestB and TestB adds TestA to its LSApplicationQueriesSchemes inside info.plist
* Thus both apps are allowed to query for each other.
* Thus both apps are allowed to query for each other.


### 常见 URL Scheme

如果想一次性集成最常用的微信、新浪微博、QQ、支付宝四者的白名单,则配置如下:

```XML
<key>LSApplicationQueriesSchemes</key>
<array>
<!-- 微信 URL Scheme 白名单-->
<string>wechat</string>
<string>weixin</string>

<!-- 新浪微博 URL Scheme 白名单-->
<string>sinaweibohd</string>
<string>sinaweibo</string>
<string>sinaweibosso</string>
<string>weibosdk</string>
<string>weibosdk2.5</string>

<!-- QQ、Qzone URL Scheme 白名单-->
<string>mqqapi</string>
<string>mqq</string>
<string>mqqOpensdkSSoLogin</string>
<string>mqqconnect</string>
<string>mqqopensdkdataline</string>
<string>mqqopensdkgrouptribeshare</string>
<string>mqqopensdkfriend</string>
<string>mqqopensdkapi</string>
<string>mqqopensdkapiV2</string>
<string>mqqopensdkapiV3</string>
<string>mqzoneopensdk</string>
<string>wtloginmqq</string>
<string>wtloginmqq2</string>
<string>mqqwpa</string>
<string>mqzone</string>
<string>mqzonev2</string>
<string>mqzoneshare</string>
<string>wtloginqzone</string>
<string>mqzonewx</string>
<string>mqzoneopensdkapiV2</string>
<string>mqzoneopensdkapi19</string>
<string>mqzoneopensdkapi</string>
<string>mqzoneopensdk</string>

<!-- 支付宝 URL Scheme 白名单-->
<string>alipay</string>
<string>alipayshare</string>

</array>
```
plist 文件看起来会是这样的:

![enter image description here](http://i58.tinypic.com/e5pyee.jpg)

其他平台可在下面的列表中查询:
各平台OpenURL白名单说明

平台名称 | URL Schem | 补充说明
-------------|-------------|-------------
微信 | wechat,</p> weixin
支付宝 | alipay,</p>alipayshare
QQ | mqqOpensdkSSoLogin, </p>mqqopensdkapiV2,</p>mqqopensdkapiV3,</p>wtloginmqq2,</p>mqq,</p>mqqapi |
QZONE | mqzoneopensdk, </p>mqzoneopensdkapi,</p>mqzoneopensdkapi19,</p>mqzoneopensdkapiV2,</p>mqqOpensdkSSoLogin,</p>mqqopensdkapiV2,</p>mqqopensdkapiV3,</p>wtloginmqq2,</p>mqqapi,</p>mqqwpa,</p>mqzone,</p>mqq | [注:若同时使用QQ和QZONE,则直接添加本格即可]
新浪微博 | sinaweibo,</p>sinaweibohd,</p>sinaweibosso,</p>sinaweibohdsso,</p>weibosdk,</p>weibosdk2.5 | [后两个若导入新浪SDK则需要]
豆瓣 | 无需配置 |
开心网 | 无需配置 |
易信 | yixin,</p> yixinopenapi
Google+ | googlechrome, </p>googlechrome-x-callback,</p>hasgplus4,</p>com.google.gppconsent,</p>com.google.gppconsent.2.2.0,</p>com.google.gppconsent.2.3.0,</p>com.google.gppconsent.2.4.0,</p>com.google.gppconsent.2.4.1 |
人人网 | renrenapi,</p>renrenios,</p>renreniphone,</p>renren, |
Facebook | fbauth2 |
Twitter | 无需配置 |
Pocket | pocket-oauth-v1|
Pinterest | pinit |
Instagram | instagram |
WhatsApp | whatsapp |
Line | line |
KakaoTalk | kakaolink |
KaokaoStory | storylink |
LinkedIn | 无需配置 |
Tumblr | 无需配置 |
非平台类 | 无需配置 | ( 如短信,复制,邮件等)



Loading

0 comments on commit 5712be7

Please sign in to comment.