Skip to content

Commit

Permalink
commit by lixiaoyi
Browse files Browse the repository at this point in the history
  • Loading branch information
lixiayi committed Apr 5, 2016
0 parents commit e8bc263
Show file tree
Hide file tree
Showing 43 changed files with 9,469 additions and 0 deletions.
17 changes: 17 additions & 0 deletions AppDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// AppDelegate.h
// XYWaterFlowDemo
//
// Created by gpay on 16/3/16.
// Copyright © 2016年 xiaoyi li. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;


@end

45 changes: 45 additions & 0 deletions AppDelegate.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
//
// AppDelegate.m
// XYWaterFlowDemo
//
// Created by gpay on 16/3/16.
// Copyright © 2016年 xiaoyi li. All rights reserved.
//

#import "AppDelegate.h"

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

- (void)applicationDidEnterBackground:(UIApplication *)application {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

- (void)applicationWillEnterForeground:(UIApplication *)application {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

- (void)applicationDidBecomeActive:(UIApplication *)application {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

- (void)applicationWillTerminate:(UIApplication *)application {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

@end
38 changes: 38 additions & 0 deletions Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
27 changes: 27 additions & 0 deletions Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8150" systemVersion="15A204g" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8122"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<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"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
25 changes: 25 additions & 0 deletions Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?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">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" 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"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
72 changes: 72 additions & 0 deletions Data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
[
{
"thumbURL": "http://amuse.nen.com.cn/imagelist/11/21/9as70n3ir61b.jpg",
"width": 482,
"height": 480
},
{
"thumbURL": "http://www.nbsheji.cn/uploadfiles/2010113143922418.jpg",
"width": 270,
"height": 250
},
{
"thumbURL": "http://www.dnkb.com.cn/upload/pic/20110604/161537371.tl.jpg",
"width": 450,
"height": 543
},
{
"thumbURL": "http://www.sgxw.cn/uploadfile/2011/1022/20111022094539323.png",
"width": 476,
"height": 516
},
{
"thumbURL": "http://www.chinatibetnews.com/yule/images/attachement/jpg/site2/20100729/00248183e00a0dbb81a837.jpg",
"width": 562,
"height": 600
},
{
"thumbURL": "http://a.bbs.meishi.qq.com/forum/201110/15/203740pp4qiij6p5db4hfp.jpg",
"width": 229,
"height": 259
},
{
"thumbURL": "http://www.qqpk.cn/Article/UploadFiles/201111/2011112212074796.jpg",
"width": 543,
"height": 398
},
{
"thumbURL": "http://cdn4.haibao.cn/store/wm/bigfiles/200924/887EDBB8ECC69AB68AF2D5C74FAB89.jpg",
"width": 600,
"height": 450
},
{
"thumbURL": "http://cdn6.haibao.cn/store/wm/bigfiles/200924/887edbb8ecc69ab583f1d5c54ca881.jpg",
"width": 400,
"height": 600
},
{
"thumbURL": "http://wenwen.soso.com/p/20100819/20100819182853-960804550.jpg",
"width": 500,
"height": 315
},
{
"thumbURL": "http://imgk.zol.com.cn/samsung/4600/a4599073_s.jpg",
"width": 720,
"height": 320
},
{
"thumbURL": "http://www.qqpk.cn/Article/UploadFiles/201111/2011112212072571.jpg",
"width": 543,
"height": 364
},
{
"thumbURL": "http://lady.southcn.com/6/images/attachement/jpg/site4/20090629/0016ec7d751a0bb2dfbd3a.jpg",
"width": 395,
"height": 396
},
{
"thumbURL": "http://wenwen.soso.com/p/20100828/20100828102336-1140302797.jpg",
"width": 371,
"height": 321
}
]
19 changes: 19 additions & 0 deletions ImageInfo.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// ImageInfo.h
// XYWaterFlowDemo
//
// Created by gpay on 16/3/16.
// Copyright © 2016年 xiaoyi li. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface ImageInfo : NSObject

@property (nonatomic) float height;
@property (nonatomic) float width;
@property (nonatomic, strong) NSString *thumbURL;

- (id)initWithDictionary:(NSDictionary *)dictionary;

@end
28 changes: 28 additions & 0 deletions ImageInfo.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//
// ImageInfo.m
// XYWaterFlowDemo
//
// Created by gpay on 16/3/16.
// Copyright © 2016年 xiaoyi li. All rights reserved.
//

#import "ImageInfo.h"

@implementation ImageInfo


- (id)initWithDictionary:(NSDictionary *)dictionary {
self = [super init];
if (self) {
self.thumbURL = [dictionary objectForKey:@"thumbURL"];
self.width = [[dictionary objectForKey:@"width"]floatValue];
self.height = [[dictionary objectForKey:@"height"]floatValue];
}
return self;
}

- (NSString *)description {
return [NSString stringWithFormat:@"thumbURL:%@ width:%f height:%f",self.thumbURL,self.width,self.height];
}

@end
34 changes: 34 additions & 0 deletions ImageWaterView.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//
// ImageWaterView.h
// XYWaterFlowDemo
//
// Created by gpay on 16/3/16.
// Copyright © 2016年 xiaoyi li. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "SelfImageVIew.h"

#define SPACE 4
#define WIDTH [UIScreen mainScreen].bounds.size.width/3

@interface ImageWaterView : UIScrollView<ImageDelegate> {
UIView *firstView,*secondView,*thridView;
int higher,lower,row;
float highValue;
int countImage;
}

// 对象图像数组
@property (nonatomic, strong) NSArray *arrayImage;

// 初始化
- (id)initWithDataArray:(NSArray *)array withFrame:(CGRect)rect;

// 刷新瀑布流
- (void)refreshView:(NSArray *)array;

// 加载下一个瀑布流
- (void)loadNextPage:(NSArray *)array;
@end

Loading

0 comments on commit e8bc263

Please sign in to comment.