Skip to content

Commit 6ab710c

Browse files
committed
init
1 parent 402baef commit 6ab710c

29 files changed

+1205
-0
lines changed

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
### Xcode ###
3+
build/
4+
*.pbxuser
5+
!default.pbxuser
6+
*.mode1v3
7+
!default.mode1v3
8+
*.mode2v3
9+
!default.mode2v3
10+
*.perspectivev3
11+
!default.perspectivev3
12+
xcuserdata
13+
*.xccheckout
14+
*.moved-aside
15+
DerivedData
16+
*.xcuserstate
17+
18+
*.a

XMShare/XMShare/AppDelegate.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//
2+
// AppDelegate.h
3+
// XMShare
4+
//
5+
// Created by Amon on 15/8/6.
6+
// Copyright (c) 2015年 GodPlace. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
@interface AppDelegate : UIResponder <UIApplicationDelegate>
12+
13+
@property (strong, nonatomic) UIWindow *window;
14+
15+
16+
@end
17+

XMShare/XMShare/AppDelegate.m

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
//
2+
// AppDelegate.m
3+
// XMShare
4+
//
5+
// Created by Amon on 15/8/6.
6+
// Copyright (c) 2015年 GodPlace. All rights reserved.
7+
//
8+
9+
#import "AppDelegate.h"
10+
#import "CommonMarco.h"
11+
12+
#import "WXApi.h"
13+
#import <TencentOpenAPI/TencentOAuth.h>
14+
#import "WeiboSDK.h"
15+
16+
17+
@interface AppDelegate ()
18+
19+
@end
20+
21+
@implementation AppDelegate
22+
23+
24+
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
25+
// Override point for customization after application launch.
26+
27+
[self init3rdParty];
28+
29+
30+
return YES;
31+
}
32+
33+
/**
34+
* 初始化第三方组件
35+
*/
36+
- (void)init3rdParty
37+
{
38+
[WXApi registerApp:APP_KEY_WEIXIN];
39+
40+
[WeiboSDK enableDebugMode:YES];
41+
[WeiboSDK registerApp:APP_KEY_WEIBO];
42+
43+
}
44+
45+
46+
@end
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207"/>
5+
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
6+
</dependencies>
7+
<objects>
8+
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
9+
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
10+
<view contentMode="scaleToFill" id="iN0-l3-epB">
11+
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
12+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
13+
<subviews>
14+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015年 GodPlace. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
15+
<rect key="frame" x="20" y="439" width="441" height="21"/>
16+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
17+
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
18+
<nil key="highlightedColor"/>
19+
</label>
20+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="XMShare" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
21+
<rect key="frame" x="20" y="140" width="441" height="43"/>
22+
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
23+
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
24+
<nil key="highlightedColor"/>
25+
</label>
26+
</subviews>
27+
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
28+
<constraints>
29+
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
30+
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
31+
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
32+
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
33+
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
34+
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
35+
</constraints>
36+
<nil key="simulatedStatusBarMetrics"/>
37+
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
38+
<point key="canvasLocation" x="548" y="455"/>
39+
</view>
40+
</objects>
41+
</document>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="vXZ-lx-hvc">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
5+
</dependencies>
6+
<scenes>
7+
<!--View Controller-->
8+
<scene sceneID="ufC-wZ-h7g">
9+
<objects>
10+
<viewController id="vXZ-lx-hvc" customClass="ViewController" sceneMemberID="viewController">
11+
<layoutGuides>
12+
<viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/>
13+
<viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
14+
</layoutGuides>
15+
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
16+
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
17+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
18+
<subviews>
19+
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="zGh-VL-jvb">
20+
<rect key="frame" x="105" y="261" width="111" height="45"/>
21+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
22+
<state key="normal" title="Share">
23+
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
24+
</state>
25+
<connections>
26+
<action selector="clickShare:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="uYp-LJ-7Id"/>
27+
</connections>
28+
</button>
29+
</subviews>
30+
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
31+
</view>
32+
</viewController>
33+
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
34+
</objects>
35+
<point key="canvasLocation" x="234" y="337"/>
36+
</scene>
37+
</scenes>
38+
<simulatedMetricsContainer key="defaultSimulatedMetrics">
39+
<simulatedStatusBarMetrics key="statusBar"/>
40+
<simulatedOrientationMetrics key="orientation"/>
41+
<simulatedScreenMetrics key="destination" type="retina4"/>
42+
</simulatedMetricsContainer>
43+
</document>

XMShare/XMShare/CommonMarco.h

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//
2+
// CommonMarco.h
3+
// XMShare
4+
//
5+
// Created by Amon on 15/8/6.
6+
// Copyright (c) 2015年 GodPlace. All rights reserved.
7+
//
8+
9+
#ifndef XMShare_CommonMarco_h
10+
#define XMShare_CommonMarco_h
11+
12+
/// APP KEY
13+
#define APP_KEY_WEIXIN @"wxd930ea5d5a258f4f"
14+
15+
#define APP_KEY_QQ @"222222"
16+
17+
#define APP_KEY_WEIBO @"2045436852"
18+
19+
#define APP_KEY_WEIBO_RedirectURL @"http://www.sina.com"
20+
21+
/// Common size
22+
#define SIZE_OF_SCREEN [[UIScreen mainScreen] bounds].size
23+
24+
25+
/// View 圆角
26+
#define ViewRadius(View, Radius)\
27+
\
28+
[View.layer setCornerRadius:(Radius)];\
29+
[View.layer setMasksToBounds:YES]
30+
31+
/// View加边框
32+
#define ViewBorder(View, BorderColor, BorderWidth )\
33+
\
34+
View.layer.borderColor = BorderColor.CGColor;\
35+
View.layer.borderWidth = BorderWidth;
36+
37+
38+
#endif
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "iphone",
5+
"size" : "29x29",
6+
"scale" : "2x"
7+
},
8+
{
9+
"idiom" : "iphone",
10+
"size" : "29x29",
11+
"scale" : "3x"
12+
},
13+
{
14+
"idiom" : "iphone",
15+
"size" : "40x40",
16+
"scale" : "2x"
17+
},
18+
{
19+
"idiom" : "iphone",
20+
"size" : "40x40",
21+
"scale" : "3x"
22+
},
23+
{
24+
"idiom" : "iphone",
25+
"size" : "60x60",
26+
"scale" : "2x"
27+
},
28+
{
29+
"idiom" : "iphone",
30+
"size" : "60x60",
31+
"scale" : "3x"
32+
}
33+
],
34+
"info" : {
35+
"version" : 1,
36+
"author" : "xcode"
37+
}
38+
}

XMShare/XMShare/Info.plist

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>en</string>
7+
<key>CFBundleExecutable</key>
8+
<string>$(EXECUTABLE_NAME)</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>com.godplace.$(PRODUCT_NAME:rfc1034identifier)</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>$(PRODUCT_NAME)</string>
15+
<key>CFBundlePackageType</key>
16+
<string>APPL</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleSignature</key>
20+
<string>????</string>
21+
<key>CFBundleURLTypes</key>
22+
<array>
23+
<dict>
24+
<key>CFBundleTypeRole</key>
25+
<string>Editor</string>
26+
<key>CFBundleURLName</key>
27+
<string>tencentopenapi</string>
28+
<key>CFBundleURLSchemes</key>
29+
<array>
30+
<string>tencent222222</string>
31+
</array>
32+
</dict>
33+
<dict>
34+
<key>CFBundleTypeRole</key>
35+
<string>Editor</string>
36+
<key>CFBundleURLName</key>
37+
<string>mqqapi</string>
38+
<key>CFBundleURLSchemes</key>
39+
<array>
40+
<string>QQ0605C97A</string>
41+
</array>
42+
</dict>
43+
<dict>
44+
<key>CFBundleTypeRole</key>
45+
<string>Editor</string>
46+
<key>CFBundleURLName</key>
47+
<string>weibo</string>
48+
<key>CFBundleURLSchemes</key>
49+
<array>
50+
<string>wb2045436852</string>
51+
</array>
52+
</dict>
53+
<dict>
54+
<key>CFBundleTypeRole</key>
55+
<string>Editor</string>
56+
<key>CFBundleURLName</key>
57+
<string>weixin</string>
58+
<key>CFBundleURLSchemes</key>
59+
<array>
60+
<string>wxd930ea5d5a258f4f</string>
61+
</array>
62+
</dict>
63+
</array>
64+
<key>CFBundleVersion</key>
65+
<string>1</string>
66+
<key>LSRequiresIPhoneOS</key>
67+
<true/>
68+
<key>UILaunchStoryboardName</key>
69+
<string>LaunchScreen</string>
70+
<key>UIMainStoryboardFile</key>
71+
<string>Main</string>
72+
<key>UIRequiredDeviceCapabilities</key>
73+
<array>
74+
<string>armv7</string>
75+
</array>
76+
<key>UISupportedInterfaceOrientations</key>
77+
<array>
78+
<string>UIInterfaceOrientationPortrait</string>
79+
<string>UIInterfaceOrientationLandscapeLeft</string>
80+
<string>UIInterfaceOrientationLandscapeRight</string>
81+
</array>
82+
</dict>
83+
</plist>
2.26 KB
Loading
1.19 KB
Loading

0 commit comments

Comments
 (0)