Skip to content

Commit

Permalink
xibTest
Browse files Browse the repository at this point in the history
  • Loading branch information
fjliang committed Mar 23, 2016
1 parent 54d99f4 commit 319c77d
Show file tree
Hide file tree
Showing 5 changed files with 196 additions and 3 deletions.
13 changes: 13 additions & 0 deletions XIBTest.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
objects = {

/* Begin PBXBuildFile section */
7E3B54781CA24E5600FEC3EC /* OneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E3B54771CA24E5600FEC3EC /* OneViewController.m */; };
7E3B547A1CA25F7E00FEC3EC /* manage_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E3B54791CA25F7E00FEC3EC /* manage_bg.png */; };
7EBA838A1CA12F9B00CC4A54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 7EBA83891CA12F9B00CC4A54 /* main.m */; };
7EBA838D1CA12F9B00CC4A54 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7EBA838C1CA12F9B00CC4A54 /* AppDelegate.m */; };
7EBA83901CA12F9B00CC4A54 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7EBA838F1CA12F9B00CC4A54 /* ViewController.m */; };
Expand Down Expand Up @@ -35,6 +37,9 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
7E3B54761CA24E5600FEC3EC /* OneViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneViewController.h; sourceTree = "<group>"; };
7E3B54771CA24E5600FEC3EC /* OneViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OneViewController.m; sourceTree = "<group>"; };
7E3B54791CA25F7E00FEC3EC /* manage_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = manage_bg.png; sourceTree = "<group>"; };
7EBA83851CA12F9B00CC4A54 /* XIBTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = XIBTest.app; sourceTree = BUILT_PRODUCTS_DIR; };
7EBA83891CA12F9B00CC4A54 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
7EBA838B1CA12F9B00CC4A54 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -101,6 +106,7 @@
7EBA83871CA12F9B00CC4A54 /* XIBTest */ = {
isa = PBXGroup;
children = (
7E3B54791CA25F7E00FEC3EC /* manage_bg.png */,
7EBA838B1CA12F9B00CC4A54 /* AppDelegate.h */,
7EBA838C1CA12F9B00CC4A54 /* AppDelegate.m */,
7EBA838E1CA12F9B00CC4A54 /* ViewController.h */,
Expand All @@ -110,6 +116,8 @@
7EBA83961CA12F9B00CC4A54 /* LaunchScreen.storyboard */,
7EBA83991CA12F9B00CC4A54 /* Info.plist */,
7EBA83881CA12F9B00CC4A54 /* Supporting Files */,
7E3B54761CA24E5600FEC3EC /* OneViewController.h */,
7E3B54771CA24E5600FEC3EC /* OneViewController.m */,
);
path = XIBTest;
sourceTree = "<group>";
Expand Down Expand Up @@ -244,6 +252,7 @@
buildActionMask = 2147483647;
files = (
7EBA83981CA12F9B00CC4A54 /* LaunchScreen.storyboard in Resources */,
7E3B547A1CA25F7E00FEC3EC /* manage_bg.png in Resources */,
7EBA83951CA12F9B00CC4A54 /* Assets.xcassets in Resources */,
7EBA83931CA12F9B00CC4A54 /* Main.storyboard in Resources */,
);
Expand Down Expand Up @@ -273,6 +282,7 @@
7EBA83901CA12F9B00CC4A54 /* ViewController.m in Sources */,
7EBA838D1CA12F9B00CC4A54 /* AppDelegate.m in Sources */,
7EBA838A1CA12F9B00CC4A54 /* main.m in Sources */,
7E3B54781CA24E5600FEC3EC /* OneViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -498,6 +508,7 @@
7EBA83B41CA12F9B00CC4A54 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7EBA83B51CA12F9B00CC4A54 /* Build configuration list for PBXNativeTarget "XIBTestTests" */ = {
isa = XCConfigurationList;
Expand All @@ -506,6 +517,7 @@
7EBA83B71CA12F9B00CC4A54 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7EBA83B81CA12F9B00CC4A54 /* Build configuration list for PBXNativeTarget "XIBTestUITests" */ = {
isa = XCConfigurationList;
Expand All @@ -514,6 +526,7 @@
7EBA83BA1CA12F9B00CC4A54 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down
136 changes: 133 additions & 3 deletions XIBTest/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,25 +1,155 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="fi9-mJ-J4t">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
<viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="neh-ea-Zqp" userLabel="View1">
<rect key="frame" x="20" y="74" width="440" height="426"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ooh-tJ-s2i">
<rect key="frame" x="197" y="198" width="46" height="30"/>
<state key="normal" title="Button"/>
<connections>
<segue destination="wVG-PG-o6Q" kind="show" id="GRx-26-uKb"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.64249291200112091" green="1" blue="0.2876330601091347" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="Ooh-tJ-s2i" firstAttribute="centerY" secondItem="neh-ea-Zqp" secondAttribute="centerY" id="cMm-gb-3Tt"/>
<constraint firstItem="Ooh-tJ-s2i" firstAttribute="centerX" secondItem="neh-ea-Zqp" secondAttribute="centerX" id="h5B-ya-kkn"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="le5-Nz-im4" userLabel="View2">
<rect key="frame" x="470" y="74" width="110" height="426"/>
<color key="backgroundColor" red="1" green="0.68561055230000001" blue="0.23023026390000001" alpha="1" colorSpace="calibratedRGB"/>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZfA-eR-dAF" userLabel="View3">
<rect key="frame" x="20" y="510" width="560" height="80"/>
<color key="backgroundColor" red="1" green="0.51802427593382228" blue="0.96872265956135351" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="80" id="lgK-2M-aYl"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="le5-Nz-im4" firstAttribute="top" secondItem="neh-ea-Zqp" secondAttribute="top" id="6nJ-hI-oa8"/>
<constraint firstItem="neh-ea-Zqp" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" multiplier="0.8" id="BYa-6U-Icb"/>
<constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="ZfA-eR-dAF" secondAttribute="bottom" constant="10" id="Cn8-Sx-1Ee"/>
<constraint firstItem="le5-Nz-im4" firstAttribute="leading" secondItem="neh-ea-Zqp" secondAttribute="trailing" constant="10" id="FYD-mt-uOu"/>
<constraint firstItem="ZfA-eR-dAF" firstAttribute="leading" secondItem="neh-ea-Zqp" secondAttribute="leading" id="VqB-OL-8Ij"/>
<constraint firstItem="ZfA-eR-dAF" firstAttribute="trailing" secondItem="le5-Nz-im4" secondAttribute="trailing" id="ag4-fW-IZf"/>
<constraint firstItem="ZfA-eR-dAF" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="bek-ve-TtO"/>
<constraint firstItem="neh-ea-Zqp" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="topMargin" constant="74" id="kFA-Of-I7R"/>
<constraint firstItem="ZfA-eR-dAF" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" id="q4r-hL-5gq"/>
<constraint firstItem="ZfA-eR-dAF" firstAttribute="top" secondItem="neh-ea-Zqp" secondAttribute="bottom" constant="10" id="vvO-Eo-rPY"/>
<constraint firstItem="le5-Nz-im4" firstAttribute="height" secondItem="neh-ea-Zqp" secondAttribute="height" id="zFJ-2j-DnG"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="wPQ-H3-NeA"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1301.25" y="386.61971830985914"/>
</scene>
<!--One View Controller-->
<scene sceneID="ORx-38-U9V">
<objects>
<viewController id="wVG-PG-o6Q" customClass="OneViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="JGm-wp-lIu"/>
<viewControllerLayoutGuide type="bottom" id="H3t-j1-Vzx"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="ik7-AS-FHX">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="manage_bg.png" translatesAutoresizingMaskIntoConstraints="NO" id="PzE-V2-yZD">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bsH-qg-7sO">
<rect key="frame" x="150" y="80" width="300" height="210"/>
<color key="backgroundColor" red="0.55556604560376077" green="0.42614038374781971" blue="1" alpha="0.076379654255319146" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="80" id="7N4-zE-cOb"/>
<constraint firstAttribute="width" secondItem="bsH-qg-7sO" secondAttribute="height" multiplier="1:0.7" id="iux-g5-E5V"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="8"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<variation key="default">
<mask key="constraints">
<exclude reference="7N4-zE-cOb"/>
</mask>
</variation>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="PzE-V2-yZD" secondAttribute="trailing" id="1vH-W3-DXQ"/>
<constraint firstItem="PzE-V2-yZD" firstAttribute="centerX" secondItem="ik7-AS-FHX" secondAttribute="centerX" id="CSA-2R-T91"/>
<constraint firstItem="PzE-V2-yZD" firstAttribute="leading" secondItem="ik7-AS-FHX" secondAttribute="leading" id="Jvu-rl-ci9"/>
<constraint firstItem="bsH-qg-7sO" firstAttribute="top" secondItem="PzE-V2-yZD" secondAttribute="top" constant="80" id="KAX-VO-D8w"/>
<constraint firstItem="bsH-qg-7sO" firstAttribute="trailing" secondItem="PzE-V2-yZD" secondAttribute="trailing" multiplier="0.75" id="M2N-oD-dSO"/>
<constraint firstItem="PzE-V2-yZD" firstAttribute="top" secondItem="ik7-AS-FHX" secondAttribute="topMargin" id="OWp-8u-yAN"/>
<constraint firstItem="PzE-V2-yZD" firstAttribute="centerX" secondItem="ik7-AS-FHX" secondAttribute="centerX" id="PtC-Zn-LdN"/>
<constraint firstItem="bsH-qg-7sO" firstAttribute="centerX" secondItem="ik7-AS-FHX" secondAttribute="centerX" multiplier="0.5" id="UQV-5W-HIb"/>
<constraint firstItem="bsH-qg-7sO" firstAttribute="leading" secondItem="PzE-V2-yZD" secondAttribute="centerX" multiplier="0.5" id="XaW-6Y-Hq9"/>
<constraint firstItem="PzE-V2-yZD" firstAttribute="centerY" secondItem="ik7-AS-FHX" secondAttribute="centerY" id="eTb-zk-dgb"/>
<constraint firstAttribute="bottomMargin" secondItem="PzE-V2-yZD" secondAttribute="bottom" id="thf-HO-3YE"/>
</constraints>
<variation key="default">
<mask key="constraints">
<exclude reference="UQV-5W-HIb"/>
</mask>
</variation>
</view>
<navigationItem key="navigationItem" id="iBC-rJ-2jP"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="hlo-Ol-Vtw" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2685" y="386"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="ruL-Bl-toG">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="fi9-mJ-J4t" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="Gfb-X4-LzN">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="DzY-Ih-XkT"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="ZuB-Z8-4Yk" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="303.75" y="386.61971830985914"/>
</scene>
</scenes>
<resources>
<image name="manage_bg.png" width="640" height="1136"/>
</resources>
</document>
13 changes: 13 additions & 0 deletions XIBTest/OneViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// OneViewController.h
// XIBTest
//
// Created by OK on 16/3/23.
// Copyright © 2016年 OK. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface OneViewController : UIViewController

@end
37 changes: 37 additions & 0 deletions XIBTest/OneViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//
// OneViewController.m
// XIBTest
//
// Created by OK on 16/3/23.
// Copyright © 2016年 OK. All rights reserved.
//

#import "OneViewController.h"

@interface OneViewController ()

@end

@implementation OneViewController

- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/

@end
Binary file added XIBTest/manage_bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 319c77d

Please sign in to comment.