Skip to content

Commit

Permalink
new
Browse files Browse the repository at this point in the history
  • Loading branch information
Ellariel committed May 10, 2018
1 parent 25e48c2 commit 9be4b9b
Show file tree
Hide file tree
Showing 75 changed files with 12,862 additions and 161 deletions.
Binary file modified .DS_Store
Binary file not shown.
14 changes: 6 additions & 8 deletions Podfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'bx24' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!

pod 'AlamofireImage', '~> 3.3'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

end
target 'bx24' do
pod 'AlamofireImage', '~> 3.3'
end
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ SPEC CHECKSUMS:
Alamofire: e4fa87002c137ba2d8d634d2c51fabcda0d5c223
AlamofireImage: 3b35b586853abaf94ca1250f4e94cff3c21a4c0d

PODFILE CHECKSUM: a7407b3a11a270dbae8de9fc024dc8e72efe69e5
PODFILE CHECKSUM: 5b3df93b737631142b57369aa417ab35cf930780

COCOAPODS: 1.5.0
2 changes: 1 addition & 1 deletion Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

217 changes: 108 additions & 109 deletions Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion bx24.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -407,13 +407,18 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = JT2EEB8FZU;
"FRAMEWORK_SEARCH_PATHS[arch=*]" = (
"$(inherited)",
"\"${PODS_CONFIGURATION_BUILD_DIR}/Alamofire\"",
"\"${PODS_CONFIGURATION_BUILD_DIR}/AlamofireImage\"",
);
INFOPLIST_FILE = "$(SRCROOT)/bx24/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
ONLY_ACTIVE_ARCH = NO;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = ru.susu.bx24;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -436,6 +441,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = ru.susu.bx24;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
2 changes: 1 addition & 1 deletion bx24.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
7 changes: 2 additions & 5 deletions bx24/GalleryView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class GalleryView: UIView {
var urls: [URL?] = []

public func loadUrls(urls links: [String]) {
urls = links.map { URL(string: $0) } //.filter { ($0 != nil) }
urls = links.map { URL(string: $0) }

reloadImages()
}
Expand All @@ -31,7 +31,7 @@ class GalleryView: UIView {
imageView.contentMode = .scaleAspectFit

//let placeholderImage = UIImage(named: "placeholder", url: url)!
//imageView.af_setImage(withURL: url, placeholderImage: placeholderImage)
imageView.af_setImage(withURL: url)


scrollView.addSubview(imageView)
Expand All @@ -53,9 +53,6 @@ extension GalleryView: UIScrollViewDelegate {
func scrollViewDidScroll(_ scrollView: UIScrollView) {
let x = scrollView.contentOffset.x / scrollView.frame.size.width
let index = Int(floor(x - 0.5)) + 1
// let offset = (scrollView.contentOffset.x - CGFloat(index) * scrollView.frame.size.width) / scrollView.frame.size.width
//
// print("o: \(offset)")

pageControll.currentPage = index
}
Expand Down
52 changes: 19 additions & 33 deletions bx24/Resources/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -112,38 +112,41 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="olb-Xf-2dc">
<rect key="frame" x="0.0" y="0.0" width="375" height="607"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ImW-y7-FPu" customClass="GalleryView" customModule="bx24" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="216"/>
<subviews>
<pageControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" numberOfPages="2" translatesAutoresizingMaskIntoConstraints="NO" id="kd9-Oa-jFA">
<rect key="frame" x="182" y="179" width="23" height="37"/>
</pageControl>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lCs-KG-4Y6">
<rect key="frame" x="106" y="18" width="175" height="153"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="216"/>
<connections>
<outlet property="delegate" destination="ImW-y7-FPu" id="dkd-gB-ucN"/>
</connections>
</scrollView>
<pageControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" numberOfPages="2" translatesAutoresizingMaskIntoConstraints="NO" id="kd9-Oa-jFA">
<rect key="frame" x="182" y="179" width="23" height="37"/>
</pageControl>
</subviews>
<color key="backgroundColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="kd9-Oa-jFA" secondAttribute="bottom" id="5jF-rM-Rv1"/>
<constraint firstItem="kd9-Oa-jFA" firstAttribute="top" secondItem="lCs-KG-4Y6" secondAttribute="bottom" constant="8" id="8hI-oV-bae"/>
<constraint firstAttribute="trailing" secondItem="lCs-KG-4Y6" secondAttribute="trailing" constant="94" id="CWJ-Yc-Oj8"/>
<constraint firstItem="lCs-KG-4Y6" firstAttribute="top" secondItem="ImW-y7-FPu" secondAttribute="top" constant="18" id="NGQ-ql-g3B"/>
<constraint firstItem="kd9-Oa-jFA" firstAttribute="top" secondItem="lCs-KG-4Y6" secondAttribute="bottom" constant="-37" id="8hI-oV-bae"/>
<constraint firstAttribute="trailing" secondItem="lCs-KG-4Y6" secondAttribute="trailing" id="CWJ-Yc-Oj8"/>
<constraint firstItem="lCs-KG-4Y6" firstAttribute="top" secondItem="ImW-y7-FPu" secondAttribute="top" id="NGQ-ql-g3B"/>
<constraint firstItem="kd9-Oa-jFA" firstAttribute="centerX" secondItem="ImW-y7-FPu" secondAttribute="centerX" constant="6" id="Qkc-fz-hP9"/>
<constraint firstAttribute="height" constant="216" id="RXW-Sa-gFA"/>
<constraint firstItem="lCs-KG-4Y6" firstAttribute="leading" secondItem="ImW-y7-FPu" secondAttribute="leading" constant="106" id="woH-t5-Rk3"/>
<constraint firstItem="lCs-KG-4Y6" firstAttribute="leading" secondItem="ImW-y7-FPu" secondAttribute="leading" id="woH-t5-Rk3"/>
</constraints>
<connections>
<outlet property="pageControll" destination="kd9-Oa-jFA" id="mWD-JR-qGX"/>
<outlet property="scrollView" destination="lCs-KG-4Y6" id="mcC-Q1-2tn"/>
</connections>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5ub-C1-UFF">
<rect key="frame" x="16" y="233" width="343" height="20.5"/>
<rect key="frame" x="16" y="233" width="343" height="21"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="DBj-wP-4SU"/>
</constraints>
<fontDescription key="fontDescription" name="SFProText-Regular" family="SF Pro Text" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
Expand All @@ -154,9 +157,12 @@
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" misplaced="YES" bounces="NO" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" bouncesZoom="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="3PN-78-ttk">
<rect key="frame" x="14" y="298" width="347" height="292"/>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" bounces="NO" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" bouncesZoom="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="3PN-78-ttk">
<rect key="frame" x="14" y="298" width="347" height="354"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="354" id="Brs-2b-PoL"/>
</constraints>
<string key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.</string>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
Expand All @@ -182,33 +188,13 @@
<constraint firstItem="5ub-C1-UFF" firstAttribute="centerX" secondItem="olb-Xf-2dc" secondAttribute="centerX" id="y1o-g5-Km9"/>
</constraints>
</scrollView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="saj-BU-8KD">
<rect key="frame" x="16" y="615" width="343" height="44"/>
<color key="backgroundColor" red="0.35865642803457454" green="0.56063010718157402" blue="1" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<accessibility key="accessibilityConfiguration">
<bool key="isElement" value="NO"/>
</accessibility>
<constraints>
<constraint firstAttribute="height" constant="44" id="Fwd-7Y-hIQ"/>
</constraints>
<fontDescription key="fontDescription" name="SFProText-Semibold" family="SF Pro Text" pointSize="17"/>
<state key="normal" title="BUY">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="actionBuy:" destination="w7d-6D-afH" eventType="touchUpInside" id="ddX-ie-CaI"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="2fA-Qi-aTy" firstAttribute="trailing" secondItem="saj-BU-8KD" secondAttribute="trailing" constant="16" id="1Fi-16-v3X"/>
<constraint firstItem="olb-Xf-2dc" firstAttribute="leading" secondItem="2fA-Qi-aTy" secondAttribute="leading" id="92E-ID-5FT"/>
<constraint firstItem="olb-Xf-2dc" firstAttribute="trailing" secondItem="2fA-Qi-aTy" secondAttribute="trailing" id="Lof-7G-KrR"/>
<constraint firstItem="saj-BU-8KD" firstAttribute="top" secondItem="olb-Xf-2dc" secondAttribute="bottom" constant="8" id="cJf-rg-n34"/>
<constraint firstItem="olb-Xf-2dc" firstAttribute="bottom" secondItem="2fA-Qi-aTy" secondAttribute="bottom" id="mbq-4n-Ncj"/>
<constraint firstItem="olb-Xf-2dc" firstAttribute="top" secondItem="WXi-89-ahT" secondAttribute="top" id="nEX-6k-Xfq"/>
<constraint firstItem="saj-BU-8KD" firstAttribute="leading" secondItem="2fA-Qi-aTy" secondAttribute="leading" constant="16" id="wkE-hd-hfI"/>
<constraint firstItem="2fA-Qi-aTy" firstAttribute="bottom" secondItem="saj-BU-8KD" secondAttribute="bottom" constant="8" id="zR4-FI-WAD"/>
</constraints>
<viewLayoutGuide key="safeArea" id="2fA-Qi-aTy"/>
</view>
Expand Down
3 changes: 2 additions & 1 deletion bx24/SecondViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ extension SecondViewController: UITableViewDelegate, UITableViewDataSource {

var info = infos[indexPath.row]

info.images = ["https://png.icons8.com/ios/1600/accuracy.png"]
info.images = ["https://png.icons8.com/ios/1600/accuracy.png",
"https://pp.userapi.com/c834203/v834203757/11d0b0/74C4VbdqYSQ.jpg"]

infoViewController.info = info

Expand Down
Binary file added tmp/.DS_Store
Binary file not shown.
20 changes: 20 additions & 0 deletions tmp/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
PODS:
- Alamofire (4.7.2)
- AlamofireImage (3.3.1):
- Alamofire (~> 4.5)

DEPENDENCIES:
- AlamofireImage (~> 3.3)

SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
- Alamofire
- AlamofireImage

SPEC CHECKSUMS:
Alamofire: e4fa87002c137ba2d8d634d2c51fabcda0d5c223
AlamofireImage: 3b35b586853abaf94ca1250f4e94cff3c21a4c0d

PODFILE CHECKSUM: 1a994c3bc25d0a81e6947d151382130d8377d015

COCOAPODS: 1.5.0
19 changes: 19 additions & 0 deletions tmp/Pods/Alamofire/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9be4b9b

Please sign in to comment.