Skip to content

Commit

Permalink
Merge pull request #2 from Onix-Systems/assets_changes
Browse files Browse the repository at this point in the history
Added description and changed layout
  • Loading branch information
nezhyborets authored Nov 24, 2016
2 parents 5402d3e + 82dcafb commit 9425a79
Show file tree
Hide file tree
Showing 17 changed files with 105 additions and 24 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# RainyRefreshControl
# RainyRefreshControl

[![Swift 3.0](https://img.shields.io/badge/Swift-3.0-orange.svg?style=flat)](https://developer.apple.com/swift/)
[![Platforms iOS](https://img.shields.io/badge/Platforms-iOS-lightgray.svg?style=flat)](https://developer.apple.com/swift/)
[![Xcode 8.0+](https://img.shields.io/badge/Xcode-8.0+-blue.svg?style=flat)](https://developer.apple.com/swift/)

Project inspired by [concept](https://dribbble.com/shots/2242263--1-Pull-to-refresh-Freebie-Weather-Concept) of [Yup Nguyen](https://dribbble.com/yupnguyen)

![capture_umbrella_refresh](gif/umbrella_refresh.gif "capture_umbrella_refresh")
10 changes: 8 additions & 2 deletions RainyRefresh.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
3481E0B01DD9EA9400326856 /* rain.sks in Resources */ = {isa = PBXBuildFile; fileRef = 3481E0AF1DD9EA9400326856 /* rain.sks */; };
3481E0B31DD9EAC500326856 /* RainScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3481E0B11DD9EAC500326856 /* RainScene.swift */; };
3481E0B41DD9EAC500326856 /* RainyRefreshControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3481E0B21DD9EAC500326856 /* RainyRefreshControl.swift */; };
34C94FFB1DE72D0400298B42 /* CustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34C94FFA1DE72D0400298B42 /* CustomCell.swift */; };
34E3C27D1DDC7C1F004E5043 /* Umbrella.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34E3C27C1DDC7C1F004E5043 /* Umbrella.swift */; };
CCE8F2D38FB85D7B4FDB6314 /* Pods_RainyRefresh.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C908490ABE8126E51CB17E1 /* Pods_RainyRefresh.framework */; };
/* End PBXBuildFile section */
Expand All @@ -32,6 +33,7 @@
3481E0AF1DD9EA9400326856 /* rain.sks */ = {isa = PBXFileReference; lastKnownFileType = file.sks; path = rain.sks; sourceTree = "<group>"; };
3481E0B11DD9EAC500326856 /* RainScene.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RainScene.swift; sourceTree = "<group>"; };
3481E0B21DD9EAC500326856 /* RainyRefreshControl.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RainyRefreshControl.swift; sourceTree = "<group>"; };
34C94FFA1DE72D0400298B42 /* CustomCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomCell.swift; sourceTree = "<group>"; };
34E3C27C1DDC7C1F004E5043 /* Umbrella.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Umbrella.swift; sourceTree = "<group>"; };
3C908490ABE8126E51CB17E1 /* Pods_RainyRefresh.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RainyRefresh.framework; sourceTree = BUILT_PRODUCTS_DIR; };
8A89860DBD59E4D48B5F8E73 /* Pods-RainyRefresh.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RainyRefresh.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RainyRefresh/Pods-RainyRefresh.debug.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -91,6 +93,7 @@
3481E0A61DD9EA7F00326856 /* Info.plist */,
3481E0AF1DD9EA9400326856 /* rain.sks */,
34E3C27C1DDC7C1F004E5043 /* Umbrella.swift */,
34C94FFA1DE72D0400298B42 /* CustomCell.swift */,
);
path = RainyRefresh;
sourceTree = "<group>";
Expand Down Expand Up @@ -232,6 +235,7 @@
34E3C27D1DDC7C1F004E5043 /* Umbrella.swift in Sources */,
3481E0B31DD9EAC500326856 /* RainScene.swift in Sources */,
3481E09B1DD9EA7F00326856 /* AppDelegate.swift in Sources */,
34C94FFB1DE72D0400298B42 /* CustomCell.swift in Sources */,
3481E0B41DD9EAC500326856 /* RainyRefreshControl.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -298,7 +302,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.1;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -341,7 +345,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.1;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -355,6 +359,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = RainyRefresh/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.smallthings.HiredOnPhone.RainyRefresh;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -368,6 +373,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = RainyRefresh/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.smallthings.HiredOnPhone.RainyRefresh;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
Binary file not shown.
24 changes: 16 additions & 8 deletions RainyRefresh/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,51 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x"
}
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 43 additions & 11 deletions RainyRefresh/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand Down Expand Up @@ -38,33 +40,63 @@
<rect key="frame" x="0.0" y="64" width="375" height="603"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="110" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="GLO-5s-DR4">
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="111" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="GLO-5s-DR4">
<rect key="frame" x="0.0" y="0.0" width="375" height="603"/>
<color key="backgroundColor" red="0.86666666670000003" green="0.85882352939999995" blue="0.87843137250000003" alpha="1" colorSpace="calibratedRGB"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" rowHeight="110" id="IwK-1e-gkP">
<rect key="frame" x="0.0" y="22" width="375" height="110"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" rowHeight="111" id="IwK-1e-gkP" customClass="CustomCell" customModule="RainyRefresh" customModuleProvider="target">
<rect key="frame" x="0.0" y="22" width="375" height="111"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="IwK-1e-gkP" id="jam-8H-i1t">
<rect key="frame" x="0.0" y="0.0" width="375" height="109"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="110.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OwZ-32-s0y">
<rect key="frame" x="16" y="8" width="240" height="46"/>
<color key="backgroundColor" red="0.92156862750000001" green="0.0" blue="0.039215686270000001" alpha="1" colorSpace="calibratedRGB"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7CF-MH-oN7">
<rect key="frame" x="43" y="26" width="66" height="66"/>
<color key="backgroundColor" red="0.68627450980392157" green="0.6705882352941176" blue="0.70588235294117641" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" constant="240" id="WB9-dA-YG4"/>
<constraint firstAttribute="height" constant="46" id="cN3-0L-a09"/>
<constraint firstAttribute="width" secondItem="7CF-MH-oN7" secondAttribute="height" multiplier="1:1" id="kh3-9o-YKI"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0UP-fs-zJu">
<rect key="frame" x="128" y="26" width="198" height="10"/>
<color key="backgroundColor" red="0.68627450980000004" green="0.6705882353" blue="0.70588235290000001" alpha="1" colorSpace="calibratedRGB"/>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="usT-3w-ojV">
<rect key="frame" x="128" y="48" width="198" height="10"/>
<color key="backgroundColor" red="0.68627450980000004" green="0.6705882353" blue="0.70588235290000001" alpha="1" colorSpace="calibratedRGB"/>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zLW-9V-SN5">
<rect key="frame" x="128" y="70" width="148" height="10"/>
<color key="backgroundColor" red="0.68627450980000004" green="0.6705882353" blue="0.70588235290000001" alpha="1" colorSpace="calibratedRGB"/>
</view>
</subviews>
<color key="backgroundColor" red="0.8666666666666667" green="0.85882352941176465" blue="0.8784313725490196" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="OwZ-32-s0y" firstAttribute="leading" secondItem="jam-8H-i1t" secondAttribute="leading" constant="16" id="UAl-Nm-hZ8"/>
<constraint firstAttribute="topMargin" secondItem="OwZ-32-s0y" secondAttribute="top" id="Yv5-zL-6wl"/>
<constraint firstItem="7CF-MH-oN7" firstAttribute="width" secondItem="jam-8H-i1t" secondAttribute="width" multiplier="0.178" id="26H-d4-u02"/>
<constraint firstItem="usT-3w-ojV" firstAttribute="top" secondItem="0UP-fs-zJu" secondAttribute="bottom" constant="12" id="7w5-kb-DsM"/>
<constraint firstItem="7CF-MH-oN7" firstAttribute="leading" secondItem="jam-8H-i1t" secondAttribute="leadingMargin" constant="35" id="Fjc-tq-Rqc"/>
<constraint firstItem="zLW-9V-SN5" firstAttribute="top" secondItem="usT-3w-ojV" secondAttribute="bottom" constant="12" id="FsZ-Mr-eWh"/>
<constraint firstItem="zLW-9V-SN5" firstAttribute="leading" secondItem="usT-3w-ojV" secondAttribute="leading" id="GFJ-kr-8WB"/>
<constraint firstItem="zLW-9V-SN5" firstAttribute="height" secondItem="usT-3w-ojV" secondAttribute="height" id="JUY-qe-Rfb"/>
<constraint firstAttribute="trailingMargin" secondItem="0UP-fs-zJu" secondAttribute="trailing" constant="41" id="O5o-UR-faA"/>
<constraint firstItem="7CF-MH-oN7" firstAttribute="top" secondItem="jam-8H-i1t" secondAttribute="topMargin" constant="18" id="SHg-yW-Rsa"/>
<constraint firstItem="0UP-fs-zJu" firstAttribute="leading" secondItem="7CF-MH-oN7" secondAttribute="trailing" constant="19" id="WLw-vJ-6CI"/>
<constraint firstItem="usT-3w-ojV" firstAttribute="height" secondItem="0UP-fs-zJu" secondAttribute="height" id="jBJ-Do-7Ft"/>
<constraint firstItem="0UP-fs-zJu" firstAttribute="height" secondItem="jam-8H-i1t" secondAttribute="height" multiplier="0.09" id="k33-yg-oFh"/>
<constraint firstItem="zLW-9V-SN5" firstAttribute="trailing" secondItem="usT-3w-ojV" secondAttribute="trailing" constant="-50" id="pUQ-CD-rHH"/>
<constraint firstItem="0UP-fs-zJu" firstAttribute="top" secondItem="7CF-MH-oN7" secondAttribute="top" id="r6X-fJ-ztu"/>
<constraint firstItem="usT-3w-ojV" firstAttribute="trailing" secondItem="0UP-fs-zJu" secondAttribute="trailing" id="vGU-el-fG7"/>
<constraint firstItem="usT-3w-ojV" firstAttribute="leading" secondItem="0UP-fs-zJu" secondAttribute="leading" id="zPy-qz-53p"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" red="0.86666666670000003" green="0.85882352939999995" blue="0.87843137250000003" alpha="1" colorSpace="calibratedRGB"/>
<connections>
<outlet property="firstLinePlaceholder" destination="0UP-fs-zJu" id="tUg-ns-Ieo"/>
<outlet property="picturePlaceholder" destination="7CF-MH-oN7" id="h4O-6q-TcX"/>
<outlet property="secondLinePlaceholder" destination="usT-3w-ojV" id="NUY-7g-LgU"/>
<outlet property="thirdLinePlaceholder" destination="zLW-9V-SN5" id="1Sg-PX-M3G"/>
</connections>
</tableViewCell>
</prototypes>
<connections>
Expand Down
27 changes: 27 additions & 0 deletions RainyRefresh/CustomCell.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// CustomCell.swift
// RainyRefresh
//
// Created by Anton Dolzhenko on 24.11.16.
// Copyright © 2016 Onix Systems. All rights reserved.
//

import UIKit

class CustomCell: UITableViewCell {

@IBOutlet weak var picturePlaceholder: UIView!
@IBOutlet weak var firstLinePlaceholder: UIView!
@IBOutlet weak var secondLinePlaceholder: UIView!
@IBOutlet weak var thirdLinePlaceholder: UIView!
}

extension CustomCell {

func config(){
picturePlaceholder.layer.cornerRadius = 6.0
firstLinePlaceholder.layer.cornerRadius = firstLinePlaceholder.bounds.height/2
secondLinePlaceholder.layer.cornerRadius = secondLinePlaceholder.bounds.height/2
thirdLinePlaceholder.layer.cornerRadius = thirdLinePlaceholder.bounds.height/2
}
}
4 changes: 2 additions & 2 deletions RainyRefresh/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ final class ViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()

navigationController?.navigationBar.barTintColor = UIColor.white

if refreshHeaderView == nil {
Expand Down Expand Up @@ -58,7 +57,8 @@ extension ViewController: UITableViewDataSource {
}

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell: UITableViewCell = UITableViewCell(style: .subtitle, reuseIdentifier: "Cell")
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! CustomCell
cell.config()
return cell
}

Expand Down
Binary file modified RainyRefresh/rain.sks
Binary file not shown.
Binary file added gif/umbrella_refresh.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9425a79

Please sign in to comment.