iOS卖瓜大队

iOS xib自动布局自定义简易轮播控件

2021-04-24  本文已影响0人  BiBiMan

先看效果  ZFBannerView

话不多说,直接上代码。

首先.h文件代码

//

//  ZFBannerView.h

//

//  Created by BiBiMan on 2021/4/23.

//  Copyright © 2021 BiBiMan. All rights reserved.

//

#import   <UIKit/UIKit.h>

#import "ZFProtocolDock.h"/**< 协议坞*/

NS_ASSUME_NONNULL_BEGIN

typedef void(^SelectBlock)(NSInteger index);

@interface ZFBannerView :UIView

+ (instancetype)nib;

@property (nonatomic, assign) CGFloat itemCornerRadius;/**< item视图圆角半径*/

@property (nonatomic, assign) UIEdgeInsets itemEdgeInsets;/**< item视图内边距-控制item的位置*/

@property (nonatomic, assign) NSTimeInterval duration;/**< 轮播间隔时间:默认2s*/

@property (nonatomic, strong) UIColor *indicatorNormalColor;/**< 分页指示器默认颜色*/

@property (nonatomic, strong) UIColor *indicatorSelectedColor;/**< 分页指示器当前(选中)颜色*/

@property (nonatomic, assign) UIViewContentMode itemContentModel;/**< 图片填充模式*/

@property (nonatomic, strong) NSArray<id> * _Nullable images;/**< 图片数组*/

@property (nonatomic, weak) id<ZFBannerViewDelegate> delegate;/**< 点击item代理回调,在协议坞自定义*/

@property (nonatomic, copy) SelectBlock handleBlock;/**< 点击block回调*/

@end

NS_ASSUME_NONNULL_END

然后.m文件代码

//

//  ZFBannerView.m

//

//  Created by BiBiMan on 2021/4/23.

//  Copyright © 2021 BiBiMan. All rights reserved.

//

#import "ZFBannerView.h"

#define PlaceHolderImage @"jiazaitupian"   /**< 占位图切图*/

@interface ZFBannerView ()<UIScrollViewDelegate>

@property (nonatomic, weak) IBOutlet UIScrollView *mainScrollView;/**< 滚动视图*/

@property (nonatomic, weak) IBOutlet UIPageControl *mainPageControl;/**< 分页指示器*/

//MARK: - 自动布局约束部分

@property (nonatomic, weak) IBOutlet NSLayoutConstraint *itemTopLayout;/**< 上边距*/

@property (nonatomic, weak) IBOutlet NSLayoutConstraint *itemLeftLayout;/**< 左边距*/

@property (nonatomic, weak) IBOutlet NSLayoutConstraint *itemBottomLayout;/**< 下边距*/

@property (nonatomic, weak) IBOutlet NSLayoutConstraint *itemRightLayout;/**< 右边距*/

@property (nonatomic, weak) IBOutlet NSLayoutConstraint *leftItemLeadingLayout;/**< 左item视图左边距*/

@property (nonatomic, weak) IBOutlet NSLayoutConstraint *rightItemLeadingLayout;/**< 右item视图左边距*/

//MARK: - 视图类属性

@property (nonatomic, weak) IBOutlet UIImageView *leftItem;/**< 左item视图*/

@property (nonatomic, weak) IBOutlet UIImageView *middleItem;/**< 中间item视图*/

@property (nonatomic, weak) IBOutlet UIImageView *rightItem;/**< 右item视图*/

//MARK: - 行为属性

@property (nonatomic, assign) NSInteger currentIndex;

//MARK: - 计时属性

@property (nonatomic, strong) NSTimer *playTimer;

@end

@implementation ZFBannerView

+ (instancetype )nib {

    Class objCls = [ZFBannerView class];

    NSString*nibName =NSStringFromClass(objCls);

    return [[[NSBundle bundleForClass:objCls] loadNibNamed:nibName owner:nil options:nil] firstObject];

}

- (void)awakeFromNib {

    [super awakeFromNib];

    self.backgroundColor = UIColor.whiteColor;

    //初始化设置

    self.duration=2;

    self.itemEdgeInsets = UIEdgeInsetsZero;

    self.itemCornerRadius = 0;

    self.currentIndex = 0;

    self.itemContentModel = UIViewContentModeScaleAspectFill;

    self.mainPageControl.numberOfPages = 0;

}

- (void)layoutSubviews {

    [super layoutSubviews];

    if(@available(iOS11.0, *)) {

        self.mainScrollView.contentSize = self.mainScrollView.contentLayoutGuide.layoutFrame.size;

    }else{

        CGFloat itemWidth = CGRectGetWidth(self.frame);

        CGFloatitemHeight =CGRectGetWidth(self.frame);

        self.mainScrollView.contentSize=CGSizeMake(itemWidth*3, itemHeight);

    }

}

- (void)setItemEdgeInsets:(UIEdgeInsets)itemEdgeInsets {

    _itemEdgeInsets= itemEdgeInsets;

    self.itemTopLayout.constant= itemEdgeInsets.top;

    self.itemLeftLayout.constant= itemEdgeInsets.left;

    self.itemBottomLayout.constant= itemEdgeInsets.bottom;

    self.itemRightLayout.constant= itemEdgeInsets.right;

    self.leftItemLeadingLayout.constant= itemEdgeInsets.left;

    self.rightItemLeadingLayout.constant= itemEdgeInsets.left;

}

- (void)setItemCornerRadius:(CGFloat)itemCornerRadius {

    _itemCornerRadius= itemCornerRadius;

    self.leftItem.layer.cornerRadius= itemCornerRadius;

    self.middleItem.layer.cornerRadius= itemCornerRadius;

    self.rightItem.layer.cornerRadius= itemCornerRadius;

}

- (void)setIndicatorNormalColor:(UIColor*)indicatorNormalColor {

    _indicatorNormalColor= indicatorNormalColor;

    self.mainPageControl.pageIndicatorTintColor= indicatorNormalColor;

}

- (void)setIndicatorSelectedColor:(UIColor*)indicatorSelectedColor {

    _indicatorSelectedColor= indicatorSelectedColor;

    self.mainPageControl.currentPageIndicatorTintColor= indicatorSelectedColor;

}

- (void)setItemContentModel:(UIViewContentMode)itemContentModel {

    _itemContentModel= itemContentModel;

    self.leftItem.contentMode= itemContentModel;

    self.middleItem.contentMode= itemContentModel;

    self.rightItem.contentMode= itemContentModel;

}

- (void)setImages:(NSArray *)images {

    if(!images.count) {

        self.userInteractionEnabled = NO;

        self.mainPageControl.numberOfPages = 0;

        [self rollBackToOriginPositon];

        return;

    }

    _images= images;

    self.mainPageControl.numberOfPages = images.count;

    [self rollBackToOriginPositon];

    [self refreshItemImage];

}

//MARK: - ScrollViewDelegate

#pragma mark - UIScrollViewDelegate <-滚动代理*****

- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {

    //即将拖拽

    [selfstopPlay];

}

-(void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate {

    //结束拖拽,即将滚动减速

    if(!decelerate) {

        //拖拽位置未变化-无减速

        [self startPlay];

    }

}

-(void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView {

    //已经结束滚动减速-进行无缝切换

    CGFloat x = scrollView.contentOffset.x;

    CGFloat index = x /CGRectGetWidth(scrollView.frame);

    if(index >1) {

        self.currentIndex = [self nextIndex];

    }else if(index <1) {

        self.currentIndex = [self lastIndex];

    }

    self.mainPageControl.currentPage = self.currentIndex;

    [self switchToMiddleItem];

    if(!self.playTimer.valid) {

        //防止重复创建计时器

        [self startPlay];

    }

}

- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView {

    [self scrollViewDidEndDecelerating:scrollView];

}

#pragma mark- *****滚动代理->

//MARK: - 回滚到初始位置

- (void)rollBackToOriginPositon {

    [self layoutIfNeeded];

    self.currentIndex = 0;

    self.mainPageControl.currentPage = 0;

    CGFloat itemWidth = self.mainScrollView.contentSize.width/3.0f;

    CGPoint offset =CGPointMake(itemWidth,0);

    [self.mainScrollView setContentOffset:offset animated:NO];

    [self startPlay];

}

//MARK: - 滚动到右侧图片

- (void)scrollToNextItemWithanimated:(BOOL)animated {

    CGFloat itemWidth = self.mainScrollView.contentSize.width/3.0;

    CGPoint offset =CGPointMake(itemWidth *2,0);

    [self.mainScrollView setContentOffset:offsetanimated:animated];

}

//MARK: - 无缝切换到中间图片

- (void)switchToMiddleItem {

    [self refreshItemImage];

    CGFloat itemWidth = self.mainScrollView.contentSize.width/3.0;

    CGPoint offset =CGPointMake(itemWidth *1,0);

    [self.mainScrollView setContentOffset:offset animated:NO];

}

//MARK: - 防止数据溢出nextIndex

- (NSInteger)nextIndex {

    NSInteger index =self.currentIndex+1;

    if(index >=self.images.count) {

        index =0;

    }

    return index;

}

//MARK: - 防止数据溢出lastIndex

- (NSInteger)lastIndex {

    NSInteger index =self.currentIndex-1;

    if(index <0) {

        index =self.images.count-1;

    }

    if(!self.images.count) {

        index =0;

    }

    return index;

}

//MARK: - 更新item的图片

- (void)refreshItemImage {

    if(!self.images.count) {

        [self setImage:PlaceHolderImage forItem:self.leftItem];

        [self setImage:PlaceHolderImage forItem:self.middleItem];

        [self setImage:PlaceHolderImage forItem:self.rightItem];

    }else{

        [self setImage:self.images[[self lastIndex]] forItem:self.leftItem];

        [self setImage:self.images[self.currentIndex] forItem:self.middleItem];

        [self setImage:self.images[[self nextIndex]] forItem:self.rightItem];

    }

}

//MARK: - 根据数组图片类型做兼容展示

- (void)setImage:(id)imageforItem:(UIImageView*)item {

    if ([image isKindOfClass:[UIImage class]]) {

        [item setImage:image];

    }else if ([image isKindOfClass:[NSString class]]) {

        NSString*imageStr = (NSString*)image;

        if([imageStr hasPrefix:@"http"]) {

            //网络图片

            [itemyy_setImageWithURL:[NSURLURLWithString:imageStr]placeholder:[UIImageimageNamed:PlaceHolderImage]];

        }else{

            UIImage*imgObj = [UIImage imageNamed:image];

            if(!imgObj) {

                imgObj = [UIImage imageNamed:PlaceHolderImage];

            }

            [item setImage:imgObj];

        }

    }else{

        [item setImage:[UIImage imageNamed:PlaceHolderImage]];

    }

}

- (void)startPlay {

    //销毁计时器

    [self stopPlay];

    if(self.images.count) {

        //初始化计时器

        self.playTimer = [NSTimer timerWithTimeInterval:self.duration target:self selector:@selector(playing) userInfo:nil repeats:YES];

        //启动计时器

        [[NSRunLoop currentRunLoop] addTimer:self.playTimer forMode:NSRunLoopCommonModes];

    }

}

//MARK: - 销毁计时器

- (void)stopPlay {

    [_playTimer invalidate];

    _playTimer = nil;

}

//MARK: - 轮播

- (void)playing {

    [self scrollToNextItemWithanimated:YES];

}

- (UIView *)superview {

    UIView*view = [supersuperview];

    if(!view) {

        [self stopPlay];

    }

    return view;

}

//点击了banner

- (IBAction)didSelectItem:(UITapGestureRecognizer *)tap {

    NSLog(@"%d-%@",(int)self.currentIndex,self.images[self.currentIndex]);

    //执行代理回调

    if([self.delegaterespondsToSelector:@selector(didSelectItemForIndex:)]) {

        [self.delegate didSelectItemForIndex:self.currentIndex];

    }

    //执行block回调

    if (self.handleBlock) {

        self.handleBlock(self.currentIndex);

    }

}

@end

最后.xib文件代码(转成Source Code)

<?xml version="1.0" encoding="UTF-8"?><document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">    <device id="retina6_1" orientation="portrait" appearance="light"/>    <dependencies>        <deployment identifier="iOS"/>        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>        <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"/>        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="ZFBannerView">            <rect key="frame" x="0.0" y="0.0" width="324" height="177"/>            <autoresizingMask key="autoresizingMask"/>            <subviews>                <scrollView clipsSubviews="YES" contentMode="scaleToFill" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DFe-13-lwj">                    <rect key="frame" x="0.0" y="0.0" width="324" height="177"/>                    <subviews>                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="o4m-R2-OK0">                            <rect key="frame" x="0.0" y="0.0" width="972" height="177"/>                            <subviews>                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="MD1-74-2D1" userLabel="MiddleView">                                    <rect key="frame" x="324" y="0.0" width="324" height="177"/>                                    <subviews>                                        <imageView clipsSubviews="YES" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="jiazaitupian" translatesAutoresizingMaskIntoConstraints="NO" id="yhq-YW-oi2">                                            <rect key="frame" x="10" y="10" width="304" height="157"/>                                            <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>                                            <gestureRecognizers/>                                            <connections>                                                <outletCollection property="gestureRecognizers" destination="7kS-V8-ZYb" appends="YES" id="1Ua-h2-3GB"/>                                            </connections>                                        </imageView>                                    </subviews>                                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>                                    <constraints>                                        <constraint firstItem="yhq-YW-oi2" firstAttribute="top" secondItem="MD1-74-2D1" secondAttribute="top" constant="10" id="NGu-rE-pgB"/>                                        <constraint firstAttribute="trailing" secondItem="yhq-YW-oi2" secondAttribute="trailing" constant="10" id="nLf-TY-GBJ"/>                                        <constraint firstAttribute="bottom" secondItem="yhq-YW-oi2" secondAttribute="bottom" constant="10" id="q3H-Hj-gUd"/>                                        <constraint firstItem="yhq-YW-oi2" firstAttribute="leading" secondItem="MD1-74-2D1" secondAttribute="leading" constant="10" id="uZO-I2-XBz"/>                                    </constraints>                                </view>                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cmK-Yq-ah2" userLabel="LeftView">                                    <rect key="frame" x="0.0" y="0.0" width="324" height="177"/>                                    <subviews>                                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="jiazaitupian" translatesAutoresizingMaskIntoConstraints="NO" id="H2T-nB-oi5">                                            <rect key="frame" x="47" y="10" width="304" height="157"/>                                            <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>                                        </imageView>                                    </subviews>                                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>                                    <constraints>                                        <constraint firstItem="H2T-nB-oi5" firstAttribute="leading" secondItem="cmK-Yq-ah2" secondAttribute="leading" constant="47" id="RZu-7J-JSR"/>                                    </constraints>                                </view>                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bgq-vH-l4W" userLabel="RightView">                                    <rect key="frame" x="648" y="0.0" width="324" height="177"/>                                    <subviews>                                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="jiazaitupian" translatesAutoresizingMaskIntoConstraints="NO" id="jF6-eH-F0u">                                            <rect key="frame" x="47" y="10" width="304" height="157"/>                                            <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>                                        </imageView>                                    </subviews>                                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>                                    <constraints>                                        <constraint firstItem="jF6-eH-F0u" firstAttribute="leading" secondItem="bgq-vH-l4W" secondAttribute="leading" constant="47" id="KtL-b3-BVi"/>                                    </constraints>                                </view>                            </subviews>                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>                            <constraints>                                <constraint firstItem="jF6-eH-F0u" firstAttribute="centerY" secondItem="yhq-YW-oi2" secondAttribute="centerY" id="418-Cr-vnL"/>                                <constraint firstItem="cmK-Yq-ah2" firstAttribute="top" secondItem="o4m-R2-OK0" secondAttribute="top" id="45R-kb-uQN"/>                                <constraint firstItem="H2T-nB-oi5" firstAttribute="width" secondItem="yhq-YW-oi2" secondAttribute="width" id="D81-bb-PLU"/>                                <constraint firstItem="cmK-Yq-ah2" firstAttribute="height" secondItem="MD1-74-2D1" secondAttribute="height" id="Ec6-CB-L9X"/>                                <constraint firstItem="bgq-vH-l4W" firstAttribute="leading" secondItem="MD1-74-2D1" secondAttribute="trailing" id="R5S-3p-HMO"/>                                <constraint firstItem="bgq-vH-l4W" firstAttribute="width" secondItem="MD1-74-2D1" secondAttribute="width" id="Tz7-QE-gPk"/>                                <constraint firstItem="H2T-nB-oi5" firstAttribute="height" secondItem="yhq-YW-oi2" secondAttribute="height" id="XlD-RO-QxM"/>                                <constraint firstItem="jF6-eH-F0u" firstAttribute="height" secondItem="yhq-YW-oi2" secondAttribute="height" id="YC3-BO-Ei6"/>                                <constraint firstItem="MD1-74-2D1" firstAttribute="height" secondItem="o4m-R2-OK0" secondAttribute="height" id="bO2-6H-Sd1"/>                                <constraint firstItem="MD1-74-2D1" firstAttribute="leading" secondItem="cmK-Yq-ah2" secondAttribute="trailing" id="bd1-AS-K33"/>                                <constraint firstItem="bgq-vH-l4W" firstAttribute="centerY" secondItem="MD1-74-2D1" secondAttribute="centerY" id="c87-tz-ic9"/>                                <constraint firstItem="bgq-vH-l4W" firstAttribute="height" secondItem="MD1-74-2D1" secondAttribute="height" id="cV8-bC-9TV"/>                                <constraint firstItem="cmK-Yq-ah2" firstAttribute="width" secondItem="MD1-74-2D1" secondAttribute="width" id="ggD-U0-NhS"/>                                <constraint firstItem="cmK-Yq-ah2" firstAttribute="centerY" secondItem="MD1-74-2D1" secondAttribute="centerY" id="iTE-1j-1uw"/>                                <constraint firstItem="MD1-74-2D1" firstAttribute="centerX" secondItem="o4m-R2-OK0" secondAttribute="centerX" id="kqN-ED-Ygd"/>                                <constraint firstItem="H2T-nB-oi5" firstAttribute="centerY" secondItem="yhq-YW-oi2" secondAttribute="centerY" id="qe7-PD-vdO"/>                                <constraint firstItem="jF6-eH-F0u" firstAttribute="width" secondItem="yhq-YW-oi2" secondAttribute="width" id="uV4-Y6-Rh3"/>                                <constraint firstItem="MD1-74-2D1" firstAttribute="centerY" secondItem="o4m-R2-OK0" secondAttribute="centerY" id="ykQ-2Q-OIx"/>                            </constraints>                        </view>                    </subviews>                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>                    <constraints>                        <constraint firstAttribute="bottom" secondItem="o4m-R2-OK0" secondAttribute="bottom" id="H6o-7z-jG6"/>                        <constraint firstAttribute="trailing" secondItem="o4m-R2-OK0" secondAttribute="trailing" id="Paj-Cn-Ui1"/>                        <constraint firstItem="o4m-R2-OK0" firstAttribute="top" secondItem="DFe-13-lwj" secondAttribute="top" id="TFa-hJ-Rnh"/>                        <constraint firstItem="o4m-R2-OK0" firstAttribute="height" secondItem="DFe-13-lwj" secondAttribute="height" id="p00-La-a0k"/>                        <constraint firstItem="o4m-R2-OK0" firstAttribute="width" secondItem="DFe-13-lwj" secondAttribute="width" multiplier="3" id="qva-pI-uzl"/>                        <constraint firstItem="o4m-R2-OK0" firstAttribute="leading" secondItem="DFe-13-lwj" secondAttribute="leading" id="uY3-9l-GAp"/>                        <constraint firstItem="MD1-74-2D1" firstAttribute="width" secondItem="DFe-13-lwj" secondAttribute="width" id="v2Q-gZ-3Uu"/>                    </constraints>                    <connections>                        <outlet property="delegate" destination="iN0-l3-epB" id="Jx2-4z-55h"/>                    </connections>                </scrollView>                <pageControl opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" numberOfPages="3" translatesAutoresizingMaskIntoConstraints="NO" id="AgE-Rg-OOb">                    <rect key="frame" x="0.0" y="137" width="324" height="40"/>                    <constraints>                        <constraint firstAttribute="height" constant="40" id="5kU-8b-Tde"/>                    </constraints>                </pageControl>            </subviews>            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>            <constraints>                <constraint firstItem="DFe-13-lwj" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" id="MZS-C9-DjH"/>                <constraint firstItem="AgE-Rg-OOb" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="OxW-TN-jnW"/>                <constraint firstAttribute="bottom" secondItem="AgE-Rg-OOb" secondAttribute="bottom" id="RKn-Ah-ygV"/>                <constraint firstItem="DFe-13-lwj" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="Yey-cG-jm0"/>                <constraint firstItem="DFe-13-lwj" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="if3-8K-4lL"/>                <constraint firstItem="DFe-13-lwj" firstAttribute="height" secondItem="iN0-l3-epB" secondAttribute="height" id="nBO-Ii-pLT"/>                <constraint firstItem="AgE-Rg-OOb" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" id="xX4-pf-ZYl"/>            </constraints>            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>            <connections>                <outlet property="itemBottomLayout" destination="q3H-Hj-gUd" id="5MQ-Z2-8y0"/>                <outlet property="itemLeftLayout" destination="uZO-I2-XBz" id="hyx-K4-t5Q"/>                <outlet property="itemRightLayout" destination="nLf-TY-GBJ" id="JR3-Rc-O3e"/>                <outlet property="itemTopLayout" destination="NGu-rE-pgB" id="Kvf-8J-RF2"/>                <outlet property="leftItem" destination="H2T-nB-oi5" id="vfB-U1-m0r"/>                <outlet property="leftItemLeadingLayout" destination="RZu-7J-JSR" id="fQP-A6-T2g"/>                <outlet property="mainPageControl" destination="AgE-Rg-OOb" id="R2a-Rc-GXD"/>                <outlet property="mainScrollView" destination="DFe-13-lwj" id="iMU-3v-1q0"/>                <outlet property="middleItem" destination="yhq-YW-oi2" id="A3p-bT-gMy"/>                <outlet property="rightItem" destination="jF6-eH-F0u" id="7xn-ft-tSk"/>                <outlet property="rightItemLeadingLayout" destination="KtL-b3-BVi" id="6qv-NA-NGp"/>            </connections>            <point key="canvasLocation" x="53.623188405797109" y="-163.05803571428569"/>        </view>        <tapGestureRecognizer id="7kS-V8-ZYb">            <connections>                <action selector="didSelectItem:" destination="iN0-l3-epB" id="20t-6D-wi8"/>            </connections>        </tapGestureRecognizer>    </objects>    <resources>        <image name="jiazaitupian" width="103.5" height="103.5"/>    </resources></document>

ZFBannerView Git Demo

上一篇 下一篇

猜你喜欢

热点阅读