Commit c8653d5d authored by Sandy's avatar Sandy

添加银行卡界面 修复部分bug

parent 3b55e678
This diff is collapsed.
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "btn_background_gray.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "btn_background_gray@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "mine_addBankCard_agree.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "mine_addBankCard_agree@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "mine_addBankCard_disagree.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "mine_addBankCard_disagree@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "mine_add_icon.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "mine_add_icon@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "mine_addbankbtn_icon.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "mine_addbankbtn_icon@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "8.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "8@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "launch.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
......@@ -14,14 +14,29 @@
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleAspectFit" image="launch" translatesAutoresizingMaskIntoConstraints="NO" id="SGe-eP-jF9">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="SGe-eP-jF9" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="CKG-hB-k8p"/>
<constraint firstItem="SGe-eP-jF9" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="F6b-Xb-Gyg"/>
<constraint firstAttribute="trailing" secondItem="SGe-eP-jF9" secondAttribute="trailing" id="T2E-Yc-l4Q"/>
<constraint firstAttribute="bottom" secondItem="SGe-eP-jF9" secondAttribute="bottom" id="cGD-ya-Ccz"/>
</constraints>
</view>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
<point key="canvasLocation" x="144" y="331"/>
</scene>
</scenes>
<resources>
<image name="launch" width="800" height="1422"/>
</resources>
</document>
......@@ -11,7 +11,7 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="95"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kJF-jD-kCU">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kJF-jD-kCU">
<rect key="frame" x="8" y="0.0" width="67" height="95"/>
<constraints>
<constraint firstAttribute="height" constant="35" id="T70-gy-1Ql"/>
......@@ -28,14 +28,14 @@
</mask>
</variation>
</button>
<button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="k9d-7S-PR5">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="k9d-7S-PR5">
<rect key="frame" x="173" y="26" width="66" height="44"/>
<fontDescription key="fontDescription" type="system" pointSize="21"/>
<state key="normal" title="下架" backgroundImage="greenbtn_bg">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QZW-mi-oUQ">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QZW-mi-oUQ">
<rect key="frame" x="100" y="26" width="65" height="44"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="aLI-tT-ELQ"/>
......@@ -45,7 +45,7 @@
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" horizontalCompressionResistancePriority="749" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5Md-Ga-YFh">
<button opaque="NO" contentMode="scaleToFill" horizontalCompressionResistancePriority="749" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5Md-Ga-YFh">
<rect key="frame" x="247" y="26" width="65" height="44"/>
<fontDescription key="fontDescription" type="system" pointSize="21"/>
<state key="normal" title="上架" backgroundImage="greenbtn_bg">
......@@ -85,7 +85,7 @@
<constraint firstItem="k9d-7S-PR5" firstAttribute="leading" secondItem="QZW-mi-oUQ" secondAttribute="trailing" constant="8" id="eH8-j0-MBp"/>
<constraint firstItem="5Xc-z0-rJW" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="eqE-Zq-iUH"/>
<constraint firstItem="5Md-Ga-YFh" firstAttribute="leading" secondItem="k9d-7S-PR5" secondAttribute="trailing" constant="8" id="f9T-ZB-P7c"/>
<constraint firstItem="k9d-7S-PR5" firstAttribute="width" secondItem="QZW-mi-oUQ" secondAttribute="width" id="g0e-4F-4mc"/>
<constraint firstItem="k9d-7S-PR5" firstAttribute="width" secondItem="QZW-mi-oUQ" secondAttribute="width" constant="1" id="g0e-4F-4mc"/>
<constraint firstItem="QZW-mi-oUQ" firstAttribute="leading" secondItem="kJF-jD-kCU" secondAttribute="trailing" constant="25" id="ggz-mv-b1G"/>
<constraint firstItem="QZW-mi-oUQ" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="jEh-5Q-p1T"/>
<constraint firstAttribute="bottom" secondItem="kJF-jD-kCU" secondAttribute="bottom" id="jZR-n2-GDK"/>
......
......@@ -28,13 +28,13 @@
self.labelTitle.text = model.name;
self.labelPrice.text = [NSString stringWithFormat:@"¥%.0f",model.price];
self.labelBrokerageRate.text = [NSString stringWithFormat:@"%.2f",model.commission];
self.labelSaleNumber.text = [NSString stringWithFormat:@"销量:%.0f",model.salesVolume];
self.labelSaleNumber.text = [NSString stringWithFormat:@"销量:%.0f",model.salesVolume];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
......
......@@ -114,6 +114,7 @@
[self.navigationController setNavigationBarHidden:YES];
}
#pragma mark =========== webView delegate ===========
- (void)webViewDidStartLoad:(UIWebView *)webView {
[MBProgressHUD showHUDAddedTo:webView animated:YES];
......@@ -128,7 +129,6 @@
- (CommodityDetailBottomView *)bottomView {
if (!_bottomView) {
_bottomView = [CommodityDetailBottomView viewWithNibName:@"CommodityDetailBottomView"];
_bottomView.frame = CGRectMake(0, kHeight - 67, kWidth, 67);
}
......
......@@ -150,13 +150,13 @@
break;
case 3://佣金
{
self.field = @"brokerageRate";
self.field = @"commission";
self.direction = @"desc";
}
break;
case 4:
{
self.field = @"brokerageRate";
self.field = @"commission";
self.direction = @"asc";
}
break;
......
......@@ -295,6 +295,7 @@
}
#pragma mark =========== tableview delegate ===========
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
......
......@@ -95,7 +95,7 @@
- (IBAction)loginACtion:(UIButton *)sender {
ToLoginViewController *toLoginVC = [[ToLoginViewController alloc] initWithNibName:@"ToLoginViewController" bundle:[NSBundle mainBundle]];
toLoginVC.isShowNavigationBar = YES;
[self.navigationController pushViewController:toLoginVC animated:YES];
}
......
......@@ -69,13 +69,14 @@
- (IBAction)forgetPasswordAction:(UIButton *)sender {
ResetPasswordViewController *resetVC = [[ResetPasswordViewController alloc] initWithNibName:@"ResetPasswordViewController" bundle:[NSBundle mainBundle]];
resetVC.isShowNavigationBar = YES;
[self.navigationController pushViewController:resetVC animated:YES];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO];
}
//- (void)viewWillAppear:(BOOL)animated {
// [super viewWillAppear:animated];
// [self.navigationController setNavigationBarHidden:NO];
//}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
......
//
// BankTableViewCell.h
// ALand
//
// Created by Z on 16/5/6.
// Copyright © 2016年 Z. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface BankTableViewCell : UITableViewCell
@end
//
// BankTableViewCell.m
// ALand
//
// Created by Z on 16/5/6.
// Copyright © 2016年 Z. All rights reserved.
//
#import "BankTableViewCell.h"
@interface BankTableViewCell ()
@property (weak, nonatomic) IBOutlet UIImageView *imgViewBackground;
@end
@implementation BankTableViewCell
- (void)awakeFromNib {
// Initialization code
self.imgViewBackground.layer.masksToBounds = YES;
self.imgViewBackground.layer.cornerRadius = 5;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<capability name="Constraints to layout margins" minToolsVersion="6.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" rowHeight="122" id="KGk-i7-Jjw" customClass="BankTableViewCell">
<rect key="frame" x="0.0" y="0.0" width="320" height="130"/>
<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="320" height="129"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="CD7-rL-3Ij">
<rect key="frame" x="10" y="0.0" width="300" height="119"/>
<color key="backgroundColor" red="0.95294117649999999" green="0.43921568630000002" blue="0.062745098040000002" alpha="1" colorSpace="calibratedRGB"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="交通银行" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1bl-Gu-RDW">
<rect key="frame" x="90" y="22" width="76" height="23"/>
<fontDescription key="fontDescription" type="system" pointSize="19"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="1yn-S5-BNS">
<rect key="frame" x="26" y="16" width="50" height="50"/>
<color key="backgroundColor" red="0.34509803919999998" green="0.75686274509999996" blue="0.050980392159999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" constant="50" id="CDG-vF-fAK"/>
<constraint firstAttribute="height" constant="50" id="NZD-As-l8U"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="储蓄卡" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xJ7-8i-4f5">
<rect key="frame" x="90" y="54" width="45" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="NbZ-Ig-8d1" userLabel="water">
<rect key="frame" x="210" y="19" width="100" height="100"/>
<constraints>
<constraint firstAttribute="height" constant="100" id="16g-H9-LdN"/>
<constraint firstAttribute="width" constant="100" id="39F-Si-EpJ"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="**** **** **** 7637" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jAQ-ZS-i4d">
<rect key="frame" x="138" y="79" width="153" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="CD7-rL-3Ij" secondAttribute="bottom" constant="10" id="5TY-VF-g1q"/>
<constraint firstItem="CD7-rL-3Ij" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="5Z7-BA-HBz"/>
<constraint firstItem="1yn-S5-BNS" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" constant="18" id="79y-EN-Y0w"/>
<constraint firstItem="1bl-Gu-RDW" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" constant="14" id="GEt-cK-NZ9"/>
<constraint firstItem="CD7-rL-3Ij" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="10" id="LYY-Sh-0po"/>
<constraint firstAttribute="trailingMargin" secondItem="jAQ-ZS-i4d" secondAttribute="trailing" constant="21" id="MOl-v7-B0U"/>
<constraint firstAttribute="bottomMargin" secondItem="jAQ-ZS-i4d" secondAttribute="bottom" constant="21" id="OLk-cG-Lgx"/>
<constraint firstItem="xJ7-8i-4f5" firstAttribute="leading" secondItem="1bl-Gu-RDW" secondAttribute="leading" id="R08-AC-O2r"/>
<constraint firstItem="1bl-Gu-RDW" firstAttribute="leading" secondItem="1yn-S5-BNS" secondAttribute="trailing" constant="14" id="RKY-xb-bsr"/>
<constraint firstAttribute="trailing" secondItem="CD7-rL-3Ij" secondAttribute="trailing" constant="10" id="Vg6-Vz-0nX"/>
<constraint firstAttribute="bottomMargin" secondItem="NbZ-Ig-8d1" secondAttribute="bottom" constant="2" id="kv6-Il-5F2"/>
<constraint firstItem="1yn-S5-BNS" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" constant="8" id="pMO-gt-dL9"/>
<constraint firstItem="xJ7-8i-4f5" firstAttribute="top" secondItem="1bl-Gu-RDW" secondAttribute="bottom" constant="9" id="uJ0-dS-Qgw"/>
<constraint firstAttribute="trailingMargin" secondItem="NbZ-Ig-8d1" secondAttribute="trailing" constant="2" id="wl9-9u-Rsd"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="imgViewBackground" destination="CD7-rL-3Ij" id="H9j-dt-pFj"/>
</connections>
<point key="canvasLocation" x="385" y="387"/>
</tableViewCell>
</objects>
</document>
//
// MyBandBottomView.h
// ALand
//
// Created by Z on 16/5/5.
// Copyright © 2016年 Z. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MyBandBottomView : UIView
@property (weak, nonatomic) IBOutlet UIButton *btnAdd;
@end
//
// MyBandBottomView.m
// ALand
//
// Created by Z on 16/5/5.
// Copyright © 2016年 Z. All rights reserved.
//
#import "MyBandBottomView.h"
@implementation MyBandBottomView
- (void)awakeFromNib {
self.btnAdd.imageView.contentMode = UIViewContentModeScaleAspectFit;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MyBandBottomView"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="MyBandBottomView">
<rect key="frame" x="0.0" y="0.0" width="320" height="60"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XEH-EO-w12">
<rect key="frame" x="95" y="5" width="130" height="50"/>
<constraints>
<constraint firstAttribute="width" constant="130" id="CeF-dx-cXo"/>
<constraint firstAttribute="height" constant="50" id="aKL-jJ-JbM"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="20"/>
<state key="normal" image="mine_addbankbtn_icon">
<color key="titleColor" red="0.34509803919999998" green="0.75686274509999996" blue="0.050980392159999999" alpha="1" colorSpace="calibratedRGB"/>
</state>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wtO-th-t2J">
<rect key="frame" x="0.0" y="0.0" width="320" height="1"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="0.35824519230769231" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="Zf6-Xv-nBW"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="wtO-th-t2J" secondAttribute="trailing" id="1TE-P3-02r"/>
<constraint firstItem="wtO-th-t2J" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="H95-Rd-Fu3"/>
<constraint firstItem="XEH-EO-w12" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="JC0-NF-IOy"/>
<constraint firstAttribute="bottom" secondItem="XEH-EO-w12" secondAttribute="bottom" id="t35-18-5pb"/>
<constraint firstItem="XEH-EO-w12" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="u60-cd-bDX"/>
<constraint firstItem="wtO-th-t2J" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="wk1-CS-dTI"/>
<constraint firstItem="XEH-EO-w12" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="zvk-MI-04t"/>
</constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<variation key="default">
<mask key="constraints">
<exclude reference="JC0-NF-IOy"/>
<exclude reference="t35-18-5pb"/>
</mask>
</variation>
<connections>
<outlet property="btnAdd" destination="XEH-EO-w12" id="4Jq-eF-VFQ"/>
</connections>
</view>
</objects>
<resources>
<image name="mine_addbankbtn_icon" width="195" height="31"/>
</resources>
</document>
......@@ -9,6 +9,7 @@
#import "MineViewController.h"
#import "SettingViewController.h"
#import "MyAcountViewController.h"
#import "MyBandCardViewController.h"
@interface MineViewController ()
@end
......@@ -19,6 +20,8 @@
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
}
- (IBAction)myAcount:(id)sender {
CLog(@"myAcount");
......@@ -27,6 +30,18 @@
[self.navigationController pushViewController:acountVC animated:YES];
}
//我的银行卡
- (IBAction)myBankCardAction:(id)sender {
MyBandCardViewController *myBankCardVC = [[MyBandCardViewController alloc] init];
myBankCardVC.isShowNavigationBar = YES;
myBankCardVC.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:myBankCardVC animated:YES];
}
//设置
- (IBAction)actionSetting:(id)sender {
SettingViewController *settingVC = [[SettingViewController alloc] init];
settingVC.isShowNavigationBar = YES;
......@@ -40,6 +55,11 @@
// Dispose of any resources that can be recreated.
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:YES];
}
/*
#pragma mark - Navigation
......
......@@ -188,6 +188,9 @@
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tqz-Pe-rl6">
<rect key="frame" x="0.0" y="0.0" width="375" height="55"/>
<connections>
<action selector="myBankCardAction:" destination="-1" eventType="touchUpInside" id="0ti-ho-TXd"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
......
......@@ -134,14 +134,14 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BED-54-Ug2">
<rect key="frame" x="1" y="1" width="124" height="96"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="待确认(元)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ood-f0-M59">
<rect key="frame" x="21" y="20" width="85" height="22"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="待确认(元)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ood-f0-M59">
<rect key="frame" x="19" y="20" width="85" height="22"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="0.00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pNx-QB-zi7">
<rect key="frame" x="36" y="52" width="55" height="32"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0.00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pNx-QB-zi7">
<rect key="frame" x="34" y="52" width="55" height="32"/>
<fontDescription key="fontDescription" type="system" pointSize="26"/>
<color key="textColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
......@@ -159,14 +159,14 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WQc-WT-07y">
<rect key="frame" x="126" y="1" width="123" height="96"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="可提现(元)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RM0-K2-Byh">
<rect key="frame" x="21" y="20" width="85" height="22"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="可提现(元)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RM0-K2-Byh">
<rect key="frame" x="19" y="20" width="85" height="22"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="0.00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XdY-4D-m6u">
<rect key="frame" x="36" y="52" width="55" height="32"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0.00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XdY-4D-m6u">
<rect key="frame" x="34" y="52" width="55" height="32"/>
<fontDescription key="fontDescription" type="system" pointSize="26"/>
<nil key="highlightedColor"/>
</label>
......@@ -189,8 +189,8 @@
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="0.00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qei-dV-eu9">
<rect key="frame" x="36" y="52" width="55" height="32"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0.00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qei-dV-eu9">
<rect key="frame" x="35" y="52" width="55" height="32"/>
<fontDescription key="fontDescription" type="system" pointSize="26"/>
<color key="textColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
......@@ -214,8 +214,8 @@
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="0.00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="W2X-n7-lfz">
<rect key="frame" x="36" y="52" width="55" height="32"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0.00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="W2X-n7-lfz">
<rect key="frame" x="34" y="52" width="55" height="32"/>
<fontDescription key="fontDescription" type="system" pointSize="26"/>
<nil key="highlightedColor"/>
</label>
......@@ -237,8 +237,8 @@
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="0.00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="raB-Fb-V7Z">
<rect key="frame" x="36" y="52" width="55" height="32"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0.00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="raB-Fb-V7Z">
<rect key="frame" x="34" y="52" width="55" height="32"/>
<fontDescription key="fontDescription" type="system" pointSize="26"/>
<nil key="highlightedColor"/>
</label>
......
//
// AddBankCardIDViewController.h
// ALand
//
// Created by Z on 16/5/5.
// Copyright © 2016年 Z. All rights reserved.
//
#import "IBTUIViewController.h"
@interface AddBankCardIDViewController : IBTUIViewController
@end
//
// AddBankCardIDViewController.m
// ALand
//
// Created by Z on 16/5/5.
// Copyright © 2016年 Z. All rights reserved.
//
#import "AddBankCardIDViewController.h"
#import "NSString+Category.h"
#import "AddDetailInfoViewController.h"
@interface AddBankCardIDViewController ()<UITextFieldDelegate>
@property (weak, nonatomic) IBOutlet UIButton *btnNext;
@property (weak, nonatomic) IBOutlet UITextField *textFieldBankCardID;
@end
@implementation AddBankCardIDViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"添加银行卡";
self.textFieldBankCardID.delegate = self;
self.btnNext.enabled = NO;
// Do any additional setup after loading the view from its nib.
}
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
NSString *strBankCardID = [textField.text stringByReplacingCharactersInRange:range withString:string];//变化后的字符串
if ([strBankCardID bankCardluhmCheck]) {
self.btnNext.enabled = YES;
}else{
self.btnNext.enabled = NO;
}
return YES;
}
- (IBAction)actionNext:(id)sender {
AddDetailInfoViewController *addDetailVC = [[AddDetailInfoViewController alloc] init];
addDetailVC.isShowNavigationBar = YES;
addDetailVC.bankCardID = self.textFieldBankCardID.text;
[self.navigationController pushViewController:addDetailVC animated:YES];
}
- (BOOL)textFieldShouldClear:(UITextField *)textField {
self.btnNext.enabled = NO;
return YES;
}
- (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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="AddBankCardIDViewController">
<connections>
<outlet property="btnNext" destination="HV1-x8-gxb" id="jsD-2B-Q0c"/>
<outlet property="textFieldBankCardID" destination="Nu2-ae-U1X" id="Bq8-0W-ojU"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="opR-Ag-Ekp">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="09n-lO-Tg5">
<rect key="frame" x="0.0" y="30" width="375" height="50"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入您的卡号" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="Nu2-ae-U1X">
<rect key="frame" x="80" y="14" width="287" height="22"/>
<constraints>
<constraint firstAttribute="height" constant="22" id="FpZ-r4-92Q"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
</textField>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="卡号" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TGZ-nP-Z6L">
<rect key="frame" x="22" y="13" width="40" height="24"/>
<fontDescription key="fontDescription" type="system" pointSize="20"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="9sj-WT-zgx"/>
<constraint firstItem="TGZ-nP-Z6L" firstAttribute="centerY" secondItem="09n-lO-Tg5" secondAttribute="centerY" id="E9I-Tc-oiV"/>
<constraint firstItem="Nu2-ae-U1X" firstAttribute="centerY" secondItem="09n-lO-Tg5" secondAttribute="centerY" id="X0Z-dn-IAo"/>
<constraint firstItem="Nu2-ae-U1X" firstAttribute="leading" secondItem="09n-lO-Tg5" secondAttribute="leading" constant="80" id="dFJ-bh-NlO"/>
<constraint firstAttribute="trailing" secondItem="Nu2-ae-U1X" secondAttribute="trailing" constant="8" id="ih4-0p-fEn"/>
<constraint firstItem="TGZ-nP-Z6L" firstAttribute="leading" secondItem="09n-lO-Tg5" secondAttribute="leading" constant="22" id="vDg-0S-5Y6"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="HV1-x8-gxb">
<rect key="frame" x="32" y="181" width="311" height="44"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="PcM-XJ-FpD"/>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="44" id="UAj-5r-UyJ"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="22"/>
<state key="normal" title="下一步" backgroundImage="rigist_btn_bg">
<color key="titleColor" red="0.97254901959999995" green="0.97254901959999995" blue="0.97254901959999995" alpha="1" colorSpace="calibratedRGB"/>
</state>
<state key="disabled" title="下一步" backgroundImage="btn_background_gray"/>
<variation key="default">
<mask key="constraints">
<exclude reference="UAj-5r-UyJ"/>
</mask>
</variation>
<connections>
<action selector="actionNext:" destination="-1" eventType="touchUpInside" id="0XW-j7-hYb"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="09n-lO-Tg5" firstAttribute="top" secondItem="opR-Ag-Ekp" secondAttribute="top" constant="30" id="3GH-Gv-OU7"/>
<constraint firstItem="09n-lO-Tg5" firstAttribute="leading" secondItem="opR-Ag-Ekp" secondAttribute="leading" id="3f1-Cy-8qt"/>
<constraint firstItem="HV1-x8-gxb" firstAttribute="leading" secondItem="opR-Ag-Ekp" secondAttribute="leading" constant="32" id="Ddl-EJ-fZt"/>
<constraint firstAttribute="trailing" secondItem="09n-lO-Tg5" secondAttribute="trailing" id="MFw-9l-5lA"/>
<constraint firstItem="HV1-x8-gxb" firstAttribute="top" secondItem="09n-lO-Tg5" secondAttribute="bottom" constant="101" id="hyc-ok-aly"/>
<constraint firstAttribute="trailing" secondItem="HV1-x8-gxb" secondAttribute="trailing" constant="32" id="nb0-Ls-Myd"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="opR-Ag-Ekp" secondAttribute="trailing" id="HOI-3U-fKQ"/>
<constraint firstAttribute="bottom" secondItem="opR-Ag-Ekp" secondAttribute="bottom" id="Mbw-0h-QbU"/>
<constraint firstItem="opR-Ag-Ekp" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="N8a-9Z-GbR"/>
<constraint firstItem="opR-Ag-Ekp" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="mMZ-Ar-eq4"/>
</constraints>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
</view>
</objects>
<resources>
<image name="btn_background_gray" width="490" height="70"/>
<image name="rigist_btn_bg" width="490" height="65"/>
</resources>
</document>
//
// AddDetailInfoViewController.h
// ALand
//
// Created by Z on 16/5/5.
// Copyright © 2016年 Z. All rights reserved.
//
#import "IBTUIViewController.h"
@interface AddDetailInfoViewController : IBTUIViewController
@property (nonatomic, copy) NSString *bankCardID;
@end
//
// AddDetailInfoViewController.m
// ALand
//
// Created by Z on 16/5/5.
// Copyright © 2016年 Z. All rights reserved.
//
#import "AddDetailInfoViewController.h"
#import "MyBankClass.h"
@interface AddDetailInfoViewController ()<UITextFieldDelegate>
@property (weak, nonatomic) IBOutlet UILabel *labelBankName;
@property (weak, nonatomic) IBOutlet UILabel *labelBankCardID;
@property (weak, nonatomic) IBOutlet UITextField *labelName;
@property (weak, nonatomic) IBOutlet UIButton *btnNext;
@property (weak, nonatomic) IBOutlet UIButton *btnAgree;
@end
@implementation AddDetailInfoViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self setDefauts];
[self machineStrings];
// Do any additional setup after loading the view from its nib.
}
//设置默认的一些信息
- (void)setDefauts {
self.title = @"添加银行卡";
self.btnNext.enabled = NO;
self.labelName.delegate = self;
}
//对文字进行加工并赋值
- (void)machineStrings {
self.labelBankName.text = [MyBankClass returnBankName:self.bankCardID];
self.labelBankCardID.text = [NSString stringWithFormat:@"***************%@",[self.bankCardID substringWithRange:NSMakeRange(self.bankCardID.length - 4, 4)]];
}
//检测下一步是否可以点
- (void)checkNextBtnIsEnabledWithName:(NSString *)name {
if (self.btnAgree.isSelected == YES && name.length > 0) {
self.btnNext.enabled = YES;
}else{
self.btnNext.enabled = NO;
}
}
#pragma mark *********** UITextFiedDelegate ***********
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
NSString *name = [textField.text stringByReplacingCharactersInRange:range withString:string];//变化后的字符串
[self checkNextBtnIsEnabledWithName:name];
return YES;
}
- (BOOL)textFieldShouldClear:(UITextField *)textField {
self.btnNext.enabled = NO;
return YES;
}
- (IBAction)actionAgree:(UIButton *)btn {
self.btnAgree.selected = !self.btnAgree.selected;
[self checkNextBtnIsEnabledWithName:self.labelName.text];
}
- (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
//
// MyBandCardViewController.h
// ALand
//
// Created by Z on 16/5/5.
// Copyright © 2016年 Z. All rights reserved.
//
#import "IBTUIViewController.h"
@interface MyBandCardViewController : IBTUIViewController
@end
//
// MyBandCardViewController.m
// ALand
//
// Created by Z on 16/5/5.
// Copyright © 2016年 Z. All rights reserved.
//
#import "MyBandCardViewController.h"
#import "MyBandBottomView.h"
#import "AddBankCardIDViewController.h"
#import "UITableView+Category.h"
#import "BankTableViewCell.h"
#define kCellID @"cellID"
@interface MyBandCardViewController ()<UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, strong) UIImageView *imgNoCardBackview;
@property (nonatomic, strong) MyBandBottomView *bottomView;
@property (nonatomic, strong) UITableView *tableView;
@end
@implementation MyBandCardViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"我的银行卡";
[self setUpNoCardBackroundView];
[self setUpTableView];
[self addBottomView];
// Do any additional setup after loading the view.
}
- (void)setUpTableView {
self.tableView = [UITableView plainTableViewWithTarget:self cellNibName:@"BankTableViewCell" cellId:kCellID];
self.tableView.contentInset = UIEdgeInsetsMake(10, 0, 0, 0);
self.tableView.backgroundColor = kBacroundColor;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
self.tableView.frame = CGRectMake(0, 0, kWidth, kHeight - 60 - 64);
[self.view addSubview:self.tableView];
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
return 130;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 4;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
BankTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellID forIndexPath:indexPath];
return cell;
}
//没有银行卡的背景
- (void)setUpNoCardBackroundView {
self.imgNoCardBackview = [UIImageView new];
[self.view addSubview:self.imgNoCardBackview];
self.imgNoCardBackview.contentMode = UIViewContentModeScaleAspectFit;
self.imgNoCardBackview.image = [UIImage imageNamed:@"mine_nocard_backround"];
self.imgNoCardBackview.sd_layout.centerXEqualToView(self.view).centerYIs(self.view.centerY - 100).leftSpaceToView(self.view, 80).rightSpaceToView(self.view, 80).heightIs(600);
}
//添加底部添加按钮
- (void)addBottomView {
self.bottomView = [MyBandBottomView viewWithNibName:@"MyBandBottomView"];
self.bottomView.frame = CGRectMake(0, kHeight - 60 - 64, kWidth, 60 + 64);
kButtonAddAction(self.bottomView.btnAdd, goAddBankCardID);
[self.view addSubview:self.bottomView];
}
- (void)goAddBankCardID {
AddBankCardIDViewController *addBankIDVC = [[AddBankCardIDViewController alloc] init];
addBankIDVC.isShowNavigationBar = YES;
[self.navigationController pushViewController:addBankIDVC animated:YES];
}
- (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
......@@ -27,7 +27,7 @@
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="rightIcon" translatesAutoresizingMaskIntoConstraints="NO" id="Tr7-KF-NsW">
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="rightIcon" translatesAutoresizingMaskIntoConstraints="NO" id="Tr7-KF-NsW">
<rect key="frame" x="357" y="30" width="10" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="10" id="21S-TV-ZBG"/>
......@@ -64,7 +64,7 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Tgc-3e-TQr" userLabel="个性签名">
<rect key="frame" x="0.0" y="98" width="375" height="50"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="rightIcon" translatesAutoresizingMaskIntoConstraints="NO" id="q4e-UX-9Iq">
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="rightIcon" translatesAutoresizingMaskIntoConstraints="NO" id="q4e-UX-9Iq">
<rect key="frame" x="357" y="10" width="10" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="10" id="gS6-OO-7Wj"/>
......@@ -104,7 +104,7 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="g2a-cQ-j4f" userLabel="消息设置">
<rect key="frame" x="0.0" y="156" width="375" height="50"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="rightIcon" translatesAutoresizingMaskIntoConstraints="NO" id="ODV-9G-WcV">
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="rightIcon" translatesAutoresizingMaskIntoConstraints="NO" id="ODV-9G-WcV">
<rect key="frame" x="357" y="10" width="10" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="10" id="CWA-MV-hPn"/>
......@@ -150,7 +150,7 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7De-WQ-TBD" userLabel="登录密码">
<rect key="frame" x="0.0" y="214" width="375" height="50"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="rightIcon" translatesAutoresizingMaskIntoConstraints="NO" id="wt1-KT-vOJ">
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="rightIcon" translatesAutoresizingMaskIntoConstraints="NO" id="wt1-KT-vOJ">
<rect key="frame" x="357" y="10" width="10" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="10" id="q7S-WT-utc"/>
......@@ -209,7 +209,7 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wea-du-rfh" userLabel="手机号码">
<rect key="frame" x="0.0" y="264" width="375" height="50"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="rightIcon" translatesAutoresizingMaskIntoConstraints="NO" id="i3E-Tf-yvZ">
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="rightIcon" translatesAutoresizingMaskIntoConstraints="NO" id="i3E-Tf-yvZ">
<rect key="frame" x="357" y="10" width="10" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="10" id="NwH-25-OHc"/>
......@@ -268,7 +268,7 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="MiY-le-eXG" userLabel="提现密码">
<rect key="frame" x="0.0" y="314" width="375" height="50"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="rightIcon" translatesAutoresizingMaskIntoConstraints="NO" id="48E-sg-B55">
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="rightIcon" translatesAutoresizingMaskIntoConstraints="NO" id="48E-sg-B55">
<rect key="frame" x="357" y="10" width="10" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="10" id="did-6Q-ZDB"/>
......@@ -327,7 +327,7 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3T0-bi-6UQ" userLabel="清空数据缓存">
<rect key="frame" x="0.0" y="372" width="375" height="50"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="rightIcon" translatesAutoresizingMaskIntoConstraints="NO" id="Lsf-Uu-0IB">
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="rightIcon" translatesAutoresizingMaskIntoConstraints="NO" id="Lsf-Uu-0IB">
<rect key="frame" x="357" y="10" width="10" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="10" id="3TR-ju-sDy"/>
......
......@@ -10,4 +10,103 @@
@interface NSString (Category)
+ (NSString *)randomTestText;
/**
* 手机号码的有效性:分电信、联通、移动和小灵通
*/
- (BOOL)isMobileNumberClassification;
/**
* 手机号有效性
*/
- (BOOL)isMobileNumber;
/**
* 邮箱的有效性
*/
- (BOOL)isEmailAddress;
/**
* 简单的身份证有效性
*
*/
- (BOOL)simpleVerifyIdentityCardNum;
/**
* 精确的身份证号码有效性检测
*
* @param value 身份证号
*/
+ (BOOL)accurateVerifyIDCardNumber:(NSString *)value;
/**
* 车牌号的有效性
*/
- (BOOL)isCarNumber;
/**
* 银行卡的有效性
*/
- (BOOL)bankCardluhmCheck;
/**
* IP地址有效性
*/
- (BOOL)isIPAddress;
/**
* Mac地址有效性
*/
- (BOOL)isMacAddress;
/**
* 网址有效性
*/
- (BOOL)isValidUrl;
/**
* 纯汉字
*/
- (BOOL)isValidChinese;
/**
* 邮政编码
*/
- (BOOL)isValidPostalcode;
/**
* 工商税号
*/
- (BOOL)isValidTaxNo;
/**
@brief 是否符合最小长度、最长长度,是否包含中文,首字母是否可以为数字
@param minLenth 账号最小长度
@param maxLenth 账号最长长度
@param containChinese 是否包含中文
@param firstCannotBeDigtal 首字母不能为数字
@return 正则验证成功返回YES, 否则返回NO
*/
- (BOOL)isValidWithMinLenth:(NSInteger)minLenth
maxLenth:(NSInteger)maxLenth
containChinese:(BOOL)containChinese
firstCannotBeDigtal:(BOOL)firstCannotBeDigtal;
/**
@brief 是否符合最小长度、最长长度,是否包含中文,数字,字母,其他字符,首字母是否可以为数字
@param minLenth 账号最小长度
@param maxLenth 账号最长长度
@param containChinese 是否包含中文
@param containDigtal 包含数字
@param containLetter 包含字母
@param containOtherCharacter 其他字符
@param firstCannotBeDigtal 首字母不能为数字
@return 正则验证成功返回YES, 否则返回NO
*/
- (BOOL)isValidWithMinLenth:(NSInteger)minLenth
maxLenth:(NSInteger)maxLenth
containChinese:(BOOL)containChinese
containDigtal:(BOOL)containDigtal
containLetter:(BOOL)containLetter
containOtherCharacter:(NSString *)containOtherCharacter
firstCannotBeDigtal:(BOOL)firstCannotBeDigtal;
@end
......@@ -9,6 +9,8 @@
#import <UIKit/UIKit.h>
@interface UITableView (Category)
+ (UITableView *)plainTableViewWithTarget:(id)target cellNibName:(NSString *)nibName cellId:(NSString *)cellId;
@end
//
// MyBankClass.h
// 跳舞兰转单
//
// Created by 张坤 on 15/12/11.
// Copyright (c) 2015年 张坤. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface MyBankClass : NSObject
+(NSString *)returnBankName:(NSString*) idCard;
+(BOOL)validatePhone:(NSString *)phone;
+(BOOL)isPureInt:(NSString *)string;
@end
This diff is collapsed.
......@@ -25,6 +25,9 @@
self.navigationItem.leftBarButtonItem = leftBtn;
[self.navigationController.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIFont systemFontOfSize:21],NSFontAttributeName, [UIColor colorWithHexString:@"333333"], NSForegroundColorAttributeName,nil]];
self.automaticallyAdjustsScrollViewInsets = NO;
// Do any additional setup after loading the view.
}
......@@ -58,7 +61,7 @@
[self.navigationController setNavigationBarHidden:NO animated:YES];
}else if (self.isShowNavigationBar == NO){
[self.navigationController setNavigationBarHidden:YES animated:YES];
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment