-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit aaf9caf
Showing
60 changed files
with
3,688 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Pod::Spec.new do |s| | ||
s.name = "Bean" | ||
s.version = "1.0.0" | ||
s.summary = "Image downloading and caching made easy" | ||
s.description = <<-DESC | ||
Features | ||
1. Download file | ||
DESC | ||
|
||
s.homepage = "https://github.com/ipraba/Bean" | ||
s.license = 'MIT' | ||
s.author = { "Prabaharan" => "[email protected]" } | ||
s.source = { :git => "https://github.com/ipraba/Bean.git", :tag => '1.0.0' } | ||
s.platform = :ios, '8.0' | ||
s.requires_arc = true | ||
s.source_files = 'Pod/Classes' | ||
s.frameworks = 'UIKit', 'Foundation' | ||
end |
Large diffs are not rendered by default.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
Example/Bean.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
116 changes: 116 additions & 0 deletions
116
Example/Bean.xcodeproj/xcshareddata/xcschemes/Bean-Example.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "0710" | ||
version = "1.3"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "607FACCF1AFB9204008FA782" | ||
BuildableName = "Bean_Example.app" | ||
BlueprintName = "Bean_Example" | ||
ReferencedContainer = "container:Bean.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "NO" | ||
buildForArchiving = "NO" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "607FACE41AFB9204008FA782" | ||
BuildableName = "Bean_Tests.xctest" | ||
BlueprintName = "Bean_Tests" | ||
ReferencedContainer = "container:Bean.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
codeCoverageEnabled = "YES"> | ||
<Testables> | ||
<TestableReference | ||
skipped = "NO"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "607FACE41AFB9204008FA782" | ||
BuildableName = "Bean_Tests.xctest" | ||
BlueprintName = "Bean_Tests" | ||
ReferencedContainer = "container:Bean.xcodeproj"> | ||
</BuildableReference> | ||
</TestableReference> | ||
</Testables> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "607FACCF1AFB9204008FA782" | ||
BuildableName = "Bean_Example.app" | ||
BlueprintName = "Bean_Example" | ||
ReferencedContainer = "container:Bean.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
<BuildableProductRunnable | ||
runnableDebuggingMode = "0"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "607FACCF1AFB9204008FA782" | ||
BuildableName = "Bean_Example.app" | ||
BlueprintName = "Bean_Example" | ||
ReferencedContainer = "container:Bean.xcodeproj"> | ||
</BuildableReference> | ||
</BuildableProductRunnable> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
<BuildableProductRunnable | ||
runnableDebuggingMode = "0"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "607FACCF1AFB9204008FA782" | ||
BuildableName = "Bean_Example.app" | ||
BlueprintName = "Bean_Example" | ||
ReferencedContainer = "container:Bean.xcodeproj"> | ||
</BuildableReference> | ||
</BuildableProductRunnable> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// | ||
// AppDelegate.swift | ||
// Bean | ||
// | ||
// Created by Prabaharan on 12/17/2015. | ||
// Copyright (c) 2015 Prabaharan. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
@UIApplicationMain | ||
class AppDelegate: UIResponder, UIApplicationDelegate { | ||
|
||
var window: UIWindow? | ||
|
||
|
||
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | ||
// Override point for customization after application launch. | ||
return true | ||
} | ||
|
||
func applicationWillResignActive(application: UIApplication) { | ||
// 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. | ||
} | ||
|
||
func applicationDidEnterBackground(application: UIApplication) { | ||
// 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. | ||
} | ||
|
||
func applicationWillEnterForeground(application: UIApplication) { | ||
// 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. | ||
} | ||
|
||
func applicationDidBecomeActive(application: UIApplication) { | ||
// 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. | ||
} | ||
|
||
func applicationWillTerminate(application: UIApplication) { | ||
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. | ||
} | ||
|
||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES"> | ||
<dependencies> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207"/> | ||
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/> | ||
</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"> | ||
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<subviews> | ||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 CocoaPods. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye"> | ||
<rect key="frame" x="20" y="439" width="441" height="21"/> | ||
<fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/> | ||
<nil key="highlightedColor"/> | ||
</label> | ||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Bean" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX"> | ||
<rect key="frame" x="20" y="140" width="441" height="43"/> | ||
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/> | ||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/> | ||
<nil key="highlightedColor"/> | ||
</label> | ||
</subviews> | ||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> | ||
<constraints> | ||
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/> | ||
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/> | ||
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/> | ||
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/> | ||
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/> | ||
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/> | ||
</constraints> | ||
<nil key="simulatedStatusBarMetrics"/> | ||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> | ||
<point key="canvasLocation" x="548" y="455"/> | ||
</view> | ||
</objects> | ||
</document> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9059" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="rDE-rl-ZD1"> | ||
<dependencies> | ||
<deployment identifier="iOS"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/> | ||
</dependencies> | ||
<scenes> | ||
<!--Navigation Controller--> | ||
<scene sceneID="8m0-YT-kgj"> | ||
<objects> | ||
<navigationController id="rDE-rl-ZD1" sceneMemberID="viewController"> | ||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="JAP-2g-D1e"> | ||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/> | ||
<autoresizingMask key="autoresizingMask"/> | ||
</navigationBar> | ||
<connections> | ||
<segue destination="NWo-LN-b8G" kind="relationship" relationship="rootViewController" id="Vgv-oc-5f5"/> | ||
</connections> | ||
</navigationController> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="fL3-rE-KCv" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="-172" y="-1071"/> | ||
</scene> | ||
<!--View Controller--> | ||
<scene sceneID="TOX-Le-VK1"> | ||
<objects> | ||
<collectionViewController id="NWo-LN-b8G" customClass="ViewController" customModule="Bean_Example" customModuleProvider="target" sceneMemberID="viewController"> | ||
<collectionView key="view" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" id="EsS-lw-Y0O"> | ||
<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="calibratedWhite"/> | ||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="ENC-RN-dWd"> | ||
<size key="itemSize" width="100" height="100"/> | ||
<size key="headerReferenceSize" width="0.0" height="0.0"/> | ||
<size key="footerReferenceSize" width="50" height="50"/> | ||
<inset key="sectionInset" minX="10" minY="10" maxX="10" maxY="10"/> | ||
</collectionViewFlowLayout> | ||
<cells> | ||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="Cell" id="jlR-7c-bU2" customClass="ImagesCell" customModule="Bean_Example" customModuleProvider="target"> | ||
<rect key="frame" x="10" y="74" width="100" height="100"/> | ||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> | ||
<rect key="frame" x="0.0" y="0.0" width="100" height="100"/> | ||
<autoresizingMask key="autoresizingMask"/> | ||
<subviews> | ||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="f5N-oX-ccx"> | ||
<rect key="frame" x="5" y="5" width="90" height="90"/> | ||
<color key="backgroundColor" red="0.0" green="0.84958367598684215" blue="1" alpha="1" colorSpace="calibratedRGB"/> | ||
</imageView> | ||
</subviews> | ||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> | ||
</view> | ||
<constraints> | ||
<constraint firstAttribute="bottom" secondItem="f5N-oX-ccx" secondAttribute="bottom" constant="5" id="P5s-nt-p8c"/> | ||
<constraint firstItem="f5N-oX-ccx" firstAttribute="leading" secondItem="jlR-7c-bU2" secondAttribute="leading" constant="5" id="UGB-1v-3d2"/> | ||
<constraint firstItem="f5N-oX-ccx" firstAttribute="top" secondItem="jlR-7c-bU2" secondAttribute="top" constant="5" id="dIg-K8-UCh"/> | ||
<constraint firstAttribute="trailing" secondItem="f5N-oX-ccx" secondAttribute="trailing" constant="5" id="xZg-IV-YmU"/> | ||
</constraints> | ||
<connections> | ||
<outlet property="imgFlicker" destination="f5N-oX-ccx" id="0nf-Ko-NpV"/> | ||
</connections> | ||
</collectionViewCell> | ||
</cells> | ||
<collectionReusableView key="sectionFooterView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="Footer" id="kgx-S2-JTg"> | ||
<rect key="frame" x="0.0" y="184" width="600" height="50"/> | ||
<autoresizingMask key="autoresizingMask"/> | ||
<subviews> | ||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Loading" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="R2W-dA-K3T"> | ||
<rect key="frame" x="270" y="14" width="61" height="21"/> | ||
<constraints> | ||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="61" id="CXk-Zg-5kk"/> | ||
<constraint firstAttribute="height" constant="21" id="eWe-mX-Wuj"/> | ||
</constraints> | ||
<fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/> | ||
<nil key="highlightedColor"/> | ||
</label> | ||
</subviews> | ||
<constraints> | ||
<constraint firstItem="R2W-dA-K3T" firstAttribute="centerX" secondItem="kgx-S2-JTg" secondAttribute="centerX" id="2N6-7I-4IC"/> | ||
<constraint firstItem="R2W-dA-K3T" firstAttribute="centerY" secondItem="kgx-S2-JTg" secondAttribute="centerY" id="Y03-bK-s17"/> | ||
</constraints> | ||
</collectionReusableView> | ||
<connections> | ||
<outlet property="dataSource" destination="NWo-LN-b8G" id="A4t-sk-xeM"/> | ||
<outlet property="delegate" destination="NWo-LN-b8G" id="SSs-3M-euV"/> | ||
</connections> | ||
</collectionView> | ||
<navigationItem key="navigationItem" id="7Zl-U5-GrB"/> | ||
</collectionViewController> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="Zfb-wC-h8q" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="606" y="-1071"/> | ||
</scene> | ||
</scenes> | ||
</document> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// Constants.swift | ||
// Bean | ||
// | ||
// Created by Prabaharan Elangovan on 20/12/15. | ||
// Copyright © 2015 CocoaPods. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import UIKit | ||
|
||
struct FlickrConstants { | ||
static let apiKey = "9492ad2565e147c97138efcedf5d4d6a" | ||
static let apiSecret = "ef85ad4b9712e87f" | ||
} | ||
|
||
struct Colors { | ||
static let EmeraldColor = UIColor(red: (46/255), green: (204/255), blue: (113/255), alpha: 1.0) | ||
static let SunflowerColor = UIColor(red: (241/255), green: (196/255), blue: (15/255), alpha: 1.0) | ||
static let PumpkinColor = UIColor(red: (211/255), green: (84/255), blue: (0/255), alpha: 1.0) | ||
static let PomegranateColor = UIColor(red: (192/255), green: (57/255), blue: (43/255), alpha: 1.0) | ||
|
||
} |
Oops, something went wrong.