Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
seasofttrimai committed Apr 19, 2017
1 parent 4ef4f65 commit 3fb6cfd
Show file tree
Hide file tree
Showing 7 changed files with 394 additions and 26 deletions.
12 changes: 12 additions & 0 deletions NewsApp/NewsApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
4A6BBDC01EA5A5B7003B3516 /* imageRight.png in Resources */ = {isa = PBXBuildFile; fileRef = 4A6BBDBE1EA5A5B6003B3516 /* imageRight.png */; };
4A6BBDC51EA5ADD9003B3516 /* CustomCells.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A6BBDC41EA5ADD9003B3516 /* CustomCells.swift */; };
4A6BBDC71EA5AE50003B3516 /* AppExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A6BBDC61EA5AE50003B3516 /* AppExtension.swift */; };
4A7851381EA6FB68006939F0 /* TinTucViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A7851371EA6FB68006939F0 /* TinTucViewController.swift */; };
4A7DDDEB1E9F155A006209F2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A7DDDEA1E9F155A006209F2 /* AppDelegate.swift */; };
4A7DDDED1E9F155A006209F2 /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A7DDDEC1E9F155A006209F2 /* HomeViewController.swift */; };
4A7DDDF01E9F155A006209F2 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4A7DDDEE1E9F155A006209F2 /* Main.storyboard */; };
Expand Down Expand Up @@ -49,6 +50,7 @@
4A6BBDBE1EA5A5B6003B3516 /* imageRight.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = imageRight.png; sourceTree = "<group>"; };
4A6BBDC41EA5ADD9003B3516 /* CustomCells.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomCells.swift; sourceTree = "<group>"; };
4A6BBDC61EA5AE50003B3516 /* AppExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppExtension.swift; sourceTree = "<group>"; };
4A7851371EA6FB68006939F0 /* TinTucViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TinTucViewController.swift; sourceTree = "<group>"; };
4A7DDDE71E9F155A006209F2 /* NewsApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NewsApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
4A7DDDEA1E9F155A006209F2 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
4A7DDDEC1E9F155A006209F2 /* HomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -126,6 +128,14 @@
name = CustomCells;
sourceTree = "<group>";
};
4A7851361EA6FB28006939F0 /* Sub ViewControllers */ = {
isa = PBXGroup;
children = (
4A7851371EA6FB68006939F0 /* TinTucViewController.swift */,
);
name = "Sub ViewControllers";
sourceTree = "<group>";
};
4A7DDDDE1E9F1559006209F2 = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -231,6 +241,7 @@
4A7DDDEC1E9F155A006209F2 /* HomeViewController.swift */,
4AEED48D1EA4B65600475FC4 /* LeftViewController.swift */,
4AEED4941EA4BA1C00475FC4 /* MainViewController.swift */,
4A7851361EA6FB28006939F0 /* Sub ViewControllers */,
);
name = ViewControllers;
sourceTree = "<group>";
Expand Down Expand Up @@ -418,6 +429,7 @@
4A7DDE2B1E9F56F0006209F2 /* TTScrollViewWrapper.m in Sources */,
4A7DDE2A1E9F56F0006209F2 /* TTScrollSlidingPagesController.m in Sources */,
4AEED4871EA4B58D00475FC4 /* LGSideMenuDrawer.m in Sources */,
4A7851381EA6FB68006939F0 /* TinTucViewController.swift in Sources */,
4AEED4861EA4B58D00475FC4 /* LGSideMenuControllerGesturesHandler.m in Sources */,
4A7DDE0D1E9F35CD006209F2 /* ThePageViewController.swift in Sources */,
4A7DDDEB1E9F155A006209F2 /* AppDelegate.swift in Sources */,
Expand Down
Binary file not shown.
54 changes: 42 additions & 12 deletions NewsApp/NewsApp/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
Expand All @@ -22,10 +23,10 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RmZ-Tc-Hqm" userLabel="Header View">
<rect key="frame" x="-4" y="0.0" width="383" height="67"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="67"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Nhật Báo" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ehh-Rh-pJQ">
<rect key="frame" x="150.5" y="34" width="83.5" height="23"/>
<rect key="frame" x="146.5" y="34" width="83.5" height="23"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="19"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
Expand All @@ -43,7 +44,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cic-1r-udb">
<rect key="frame" x="343" y="31" width="30" height="30"/>
<rect key="frame" x="335" y="31" width="30" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="30" id="7O0-k2-Uzu"/>
<constraint firstAttribute="height" constant="30" id="mJP-LA-SlC"/>
Expand All @@ -64,8 +65,9 @@
</constraints>
</view>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" bounces="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="47n-IL-dnG">
<rect key="frame" x="-4" y="67" width="383" height="40"/>
<rect key="frame" x="0.0" y="67" width="375" height="40"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="tintColor" red="0.18823529411764706" green="0.29803921568627451" blue="0.61568627450980395" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="1Vg-6A-yCc"/>
</constraints>
Expand All @@ -76,7 +78,7 @@
<inset key="sectionInset" minX="10" minY="0.0" maxX="10" maxY="0.0"/>
</collectionViewFlowLayout>
<view key="backgroundView" contentMode="scaleToFill" id="KTO-x9-YRj">
<rect key="frame" x="0.0" y="0.0" width="383" height="40"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
Expand All @@ -87,22 +89,32 @@
</connections>
</collectionView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DTK-6w-rWK">
<rect key="frame" x="-4" y="107" width="383" height="560"/>
<rect key="frame" x="0.0" y="107" width="375" height="560"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="h8f-4Z-qcV" userLabel="Mask Edge">
<rect key="frame" x="0.0" y="67" width="15" height="600"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" constant="15" id="pOB-Td-vTv"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="DTK-6w-rWK" secondAttribute="bottom" id="2Oj-JF-SdK"/>
<constraint firstItem="RmZ-Tc-Hqm" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" constant="-20" id="HZL-bo-ZnK"/>
<constraint firstItem="DTK-6w-rWK" firstAttribute="leading" secondItem="RmZ-Tc-Hqm" secondAttribute="leading" id="KCs-X7-3id"/>
<constraint firstItem="h8f-4Z-qcV" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" constant="-16" id="BHP-2N-vPU"/>
<constraint firstItem="DTK-6w-rWK" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" constant="-16" id="Bfd-3F-4VT"/>
<constraint firstItem="RmZ-Tc-Hqm" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" constant="-16" id="HZL-bo-ZnK"/>
<constraint firstItem="RmZ-Tc-Hqm" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" constant="-20" id="MIm-aR-sIZ"/>
<constraint firstItem="47n-IL-dnG" firstAttribute="top" secondItem="RmZ-Tc-Hqm" secondAttribute="bottom" id="Pwh-Uf-QfL"/>
<constraint firstItem="DTK-6w-rWK" firstAttribute="trailing" secondItem="RmZ-Tc-Hqm" secondAttribute="trailing" id="S5R-uF-7fc"/>
<constraint firstItem="DTK-6w-rWK" firstAttribute="top" secondItem="47n-IL-dnG" secondAttribute="bottom" id="cXR-vl-S6b"/>
<constraint firstAttribute="trailingMargin" secondItem="RmZ-Tc-Hqm" secondAttribute="trailing" constant="-20" id="peK-Up-2jC"/>
<constraint firstItem="47n-IL-dnG" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" constant="-20" id="qcb-nh-JXo"/>
<constraint firstAttribute="trailingMargin" secondItem="47n-IL-dnG" secondAttribute="trailing" constant="-20" id="uwZ-Nt-H65"/>
<constraint firstItem="h8f-4Z-qcV" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" constant="47" id="dgB-8C-xrg"/>
<constraint firstAttribute="trailingMargin" secondItem="DTK-6w-rWK" secondAttribute="trailing" constant="-16" id="dt0-YL-O1P"/>
<constraint firstAttribute="trailingMargin" secondItem="RmZ-Tc-Hqm" secondAttribute="trailing" constant="-16" id="peK-Up-2jC"/>
<constraint firstItem="47n-IL-dnG" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" constant="-16" id="qcb-nh-JXo"/>
<constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="h8f-4Z-qcV" secondAttribute="bottom" id="rDv-Pz-57Z"/>
<constraint firstAttribute="trailingMargin" secondItem="47n-IL-dnG" secondAttribute="trailing" constant="-16" id="uwZ-Nt-H65"/>
</constraints>
</view>
<connections>
Expand Down Expand Up @@ -155,6 +167,24 @@
</objects>
<point key="canvasLocation" x="-518" y="1128"/>
</scene>
<!--Tin Tuc View Controller-->
<scene sceneID="IQ7-Qs-G79">
<objects>
<viewController storyboardIdentifier="TinTucViewController" id="l80-O2-wwT" customClass="TinTucViewController" customModule="NewsApp" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="7HX-Zd-In0"/>
<viewControllerLayoutGuide type="bottom" id="TGC-BZ-rfb"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="7d0-U7-JP0">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="sH9-Nk-eXn" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-601" y="1832"/>
</scene>
<!--Left View Controller-->
<scene sceneID="bqe-En-hkB">
<objects>
Expand Down
26 changes: 25 additions & 1 deletion NewsApp/NewsApp/Define.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,28 @@

import Foundation

let goToLeftViewController = "LeftViewController"


enum UIUserInterfaceIdiom : Int
{
case unspecified
case phone
case pad
}

struct ScreenSize
{
static let SCREEN_WIDTH = UIScreen.main.bounds.size.width
static let SCREEN_HEIGHT = UIScreen.main.bounds.size.height
static let SCREEN_MAX_LENGTH = max(ScreenSize.SCREEN_WIDTH, ScreenSize.SCREEN_HEIGHT)
static let SCREEN_MIN_LENGTH = min(ScreenSize.SCREEN_WIDTH, ScreenSize.SCREEN_HEIGHT)
}

struct DeviceType
{
static let IS_IPHONE_4_OR_LESS = UIDevice.current.userInterfaceIdiom == .phone && ScreenSize.SCREEN_MAX_LENGTH < 568.0
static let IS_IPHONE_5 = UIDevice.current.userInterfaceIdiom == .phone && ScreenSize.SCREEN_MAX_LENGTH == 568.0
static let IS_IPHONE_6 = UIDevice.current.userInterfaceIdiom == .phone && ScreenSize.SCREEN_MAX_LENGTH == 667.0
static let IS_IPHONE_6P = UIDevice.current.userInterfaceIdiom == .phone && ScreenSize.SCREEN_MAX_LENGTH == 736.0
static let IS_IPAD = UIDevice.current.userInterfaceIdiom == .pad && ScreenSize.SCREEN_MAX_LENGTH == 1024.0
}
Loading

0 comments on commit 3fb6cfd

Please sign in to comment.