空置页面和设置页面调试通过

This commit is contained in:
xuemh
2018-04-23 00:41:11 +08:00
parent 4dd95da147
commit df311d475c
23 changed files with 2472 additions and 10 deletions
@@ -0,0 +1,17 @@
//
// CustomModeSetCell.h
// Ifish
//
// Created by Minghao Xue on 2018/4/22.
// Copyright © 2018年 lianlian. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface CustomModeSetCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UILabel *customModeTitleLbl;
@property (weak, nonatomic) IBOutlet UIButton *switchControl;
@end
@@ -0,0 +1,33 @@
//
// CustomModeSetCell.m
// Ifish
//
// Created by Minghao Xue on 2018/4/22.
// Copyright © 2018年 lianlian. All rights reserved.
//
#import "CustomModeSetCell.h"
@implementation CustomModeSetCell
- (void)awakeFromNib {
// Initialization code
self.backgroundView=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"set_cellBack"]];
UIView *clearView=[[UIView alloc] init];
clearView.backgroundColor=[UIColor clearColor];
clearView.frame=self.bounds;
self.customModeTitleLbl.font = [UIFont systemFontOfSize:15];
[self.customModeTitleLbl sizeToFit];
[self setSelectedBackgroundView:clearView];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="GuiDengViewCell" rowHeight="43" id="KGk-i7-Jjw" customClass="CustomModeSetCell">
<rect key="frame" x="0.0" y="0.0" width="327" height="48"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" ambiguous="YES" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="327" height="47.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="自定义模式开关" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Fae-Uc-c7P">
<rect key="frame" x="18" y="18" width="110" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="9ho-ka-f9n"/>
<constraint firstAttribute="width" constant="110" id="txm-ZH-wUN"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" ambiguous="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="SAe-jT-rxs">
<rect key="frame" x="254" y="11" width="60" height="33"/>
<constraints>
<constraint firstAttribute="height" constant="33" id="oLF-cT-z4c"/>
<constraint firstAttribute="width" constant="60" id="wIB-9g-a0X"/>
</constraints>
<state key="normal" backgroundImage="graybtn_big.png"/>
<state key="selected" backgroundImage="greenbtn_big.png"/>
</button>
</subviews>
<constraints>
<constraint firstAttribute="trailingMargin" secondItem="SAe-jT-rxs" secondAttribute="trailing" constant="5" id="2Wi-iL-Sfn"/>
<constraint firstItem="SAe-jT-rxs" firstAttribute="leading" secondItem="Fae-Uc-c7P" secondAttribute="trailing" constant="126" id="56D-Mp-Xah"/>
<constraint firstItem="Fae-Uc-c7P" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" constant="10" id="dWK-xq-pxG"/>
<constraint firstItem="SAe-jT-rxs" firstAttribute="centerY" secondItem="Fae-Uc-c7P" secondAttribute="centerY" id="g0F-O6-5GU"/>
<constraint firstItem="SAe-jT-rxs" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" id="gzX-So-xGM"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="customModeTitleLbl" destination="Fae-Uc-c7P" id="V49-Eh-YgL"/>
<outlet property="switchControl" destination="SAe-jT-rxs" id="vNc-Nb-a3D"/>
</connections>
<point key="canvasLocation" x="252.5" y="226"/>
</tableViewCell>
</objects>
<resources>
<image name="graybtn_big.png" width="172" height="94"/>
<image name="greenbtn_big.png" width="172" height="94"/>
</resources>
</document>
+14 -10
View File
@@ -1,9 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10117" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
@@ -12,32 +16,32 @@
<rect key="frame" x="0.0" y="0.0" width="336" height="51"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="336" height="50"/>
<rect key="frame" x="0.0" y="0.0" width="336" height="50.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ldH-Zi-Nv3">
<rect key="frame" x="205" y="17" width="38" height="18"/>
<rect key="frame" x="197" y="14" width="38" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.45490196078431372" green="0.45490196078431372" blue="0.45490196078431372" alpha="1" colorSpace="calibratedRGB"/>
<color key="textColor" red="0.45490196078431372" green="0.45490196078431372" blue="0.45490196078431372" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0CU-uJ-mzK">
<rect key="frame" x="18" y="14" width="87" height="21"/>
<rect key="frame" x="26" y="17" width="87" height="15"/>
<constraints>
<constraint firstAttribute="width" constant="87" id="uWM-a2-TdU"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.12156862745098039" green="0.12156862745098039" blue="0.12156862745098039" alpha="1" colorSpace="calibratedRGB"/>
<color key="textColor" red="0.12156862745098039" green="0.12156862745098039" blue="0.12156862745098039" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="U9D-Nd-wVC">
<rect key="frame" x="263" y="8" width="60" height="33"/>
<rect key="frame" x="255" y="8" width="60" height="33"/>
<constraints>
<constraint firstAttribute="height" constant="33" id="QNA-2E-zkO"/>
<constraint firstAttribute="width" constant="60" id="jL2-Td-vJx"/>
</constraints>
<state key="normal" backgroundImage="graybtn_big.png">
<color key="titleColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
</state>
</button>
</subviews>