diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Juick.xcodeproj/project.pbxproj | 91 | ||||
-rw-r--r-- | Juick.xcworkspace/contents.xcworkspacedata | 1 | ||||
-rw-r--r-- | Juick/AppDelegate.m | 2 | ||||
-rw-r--r-- | Juick/Base.lproj/Main.storyboard | 104 | ||||
-rw-r--r-- | Juick/DetailViewController.h | 16 | ||||
-rw-r--r-- | Juick/DetailViewController.m | 51 | ||||
-rw-r--r-- | Juick/Juick-Info.plist | 2 | ||||
-rw-r--r-- | Juick/Main.storyboard | 81 | ||||
-rw-r--r-- | Juick/MasterViewController.h | 1 | ||||
-rw-r--r-- | Juick/MasterViewController.m | 152 | ||||
-rw-r--r-- | Juick/Message.h | 20 | ||||
-rw-r--r-- | Juick/Message.m | 30 | ||||
-rw-r--r-- | Juick/MessageCell.h | 21 | ||||
-rw-r--r-- | Juick/MessageCell.m | 134 | ||||
-rw-r--r-- | Podfile | 11 | ||||
-rw-r--r-- | Podfile.lock | 21 |
17 files changed, 486 insertions, 254 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1f9ae16 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +xcuserdata +Pods/* diff --git a/Juick.xcodeproj/project.pbxproj b/Juick.xcodeproj/project.pbxproj index 75185cc..978e6d5 100644 --- a/Juick.xcodeproj/project.pbxproj +++ b/Juick.xcodeproj/project.pbxproj @@ -7,21 +7,23 @@ objects = { /* Begin PBXBuildFile section */ + 023DFC884FC1455E9522E9BF /* libPods-Juick.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E1A04338EB0146778B4503DC /* libPods-Juick.a */; }; 77317BAC181BBE8500D60005 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77317BAB181BBE8500D60005 /* Foundation.framework */; }; 77317BAE181BBE8500D60005 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77317BAD181BBE8500D60005 /* CoreGraphics.framework */; }; 77317BB0181BBE8500D60005 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77317BAF181BBE8500D60005 /* UIKit.framework */; }; 77317BB6181BBE8500D60005 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 77317BB4181BBE8500D60005 /* InfoPlist.strings */; }; 77317BB8181BBE8500D60005 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 77317BB7181BBE8500D60005 /* main.m */; }; 77317BBC181BBE8500D60005 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 77317BBB181BBE8500D60005 /* AppDelegate.m */; }; - 77317BBF181BBE8500D60005 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 77317BBD181BBE8500D60005 /* Main.storyboard */; }; 77317BC2181BBE8500D60005 /* MasterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 77317BC1181BBE8500D60005 /* MasterViewController.m */; }; - 77317BC5181BBE8500D60005 /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 77317BC4181BBE8500D60005 /* DetailViewController.m */; }; 77317BC7181BBE8500D60005 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 77317BC6181BBE8500D60005 /* Images.xcassets */; }; 77317BCE181BBE8500D60005 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77317BCD181BBE8500D60005 /* XCTest.framework */; }; 77317BCF181BBE8500D60005 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77317BAB181BBE8500D60005 /* Foundation.framework */; }; 77317BD0181BBE8500D60005 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77317BAF181BBE8500D60005 /* UIKit.framework */; }; 77317BD8181BBE8500D60005 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 77317BD6181BBE8500D60005 /* InfoPlist.strings */; }; 77317BDA181BBE8500D60005 /* JuickTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 77317BD9181BBE8500D60005 /* JuickTests.m */; }; + 77A0954A181F1F25002BDECD /* Message.m in Sources */ = {isa = PBXBuildFile; fileRef = 77A09549181F1F25002BDECD /* Message.m */; }; + 77A09569181F98D0002BDECD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 77A09568181F98D0002BDECD /* Main.storyboard */; }; + 77D163C2181F048F00401EF0 /* MessageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 77D163C1181F048F00401EF0 /* MessageCell.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -45,17 +47,21 @@ 77317BB9181BBE8500D60005 /* Juick-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Juick-Prefix.pch"; sourceTree = "<group>"; }; 77317BBA181BBE8500D60005 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; 77317BBB181BBE8500D60005 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; }; - 77317BBE181BBE8500D60005 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; 77317BC0181BBE8500D60005 /* MasterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MasterViewController.h; sourceTree = "<group>"; }; 77317BC1181BBE8500D60005 /* MasterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MasterViewController.m; sourceTree = "<group>"; }; - 77317BC3181BBE8500D60005 /* DetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DetailViewController.h; sourceTree = "<group>"; }; - 77317BC4181BBE8500D60005 /* DetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DetailViewController.m; sourceTree = "<group>"; }; 77317BC6181BBE8500D60005 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; }; 77317BCC181BBE8500D60005 /* JuickTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JuickTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 77317BCD181BBE8500D60005 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 77317BD5181BBE8500D60005 /* JuickTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "JuickTests-Info.plist"; sourceTree = "<group>"; }; 77317BD7181BBE8500D60005 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; }; 77317BD9181BBE8500D60005 /* JuickTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JuickTests.m; sourceTree = "<group>"; }; + 77A09548181F1F25002BDECD /* Message.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Message.h; sourceTree = "<group>"; }; + 77A09549181F1F25002BDECD /* Message.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Message.m; sourceTree = "<group>"; }; + 77A09568181F98D0002BDECD /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; }; + 77D163C0181F048F00401EF0 /* MessageCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageCell.h; sourceTree = "<group>"; }; + 77D163C1181F048F00401EF0 /* MessageCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageCell.m; sourceTree = "<group>"; }; + AD52EBAFFD6B4395B342F246 /* Pods-Juick.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Juick.xcconfig"; path = "Pods/Pods-Juick.xcconfig"; sourceTree = "<group>"; }; + E1A04338EB0146778B4503DC /* libPods-Juick.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Juick.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -66,6 +72,7 @@ 77317BAE181BBE8500D60005 /* CoreGraphics.framework in Frameworks */, 77317BB0181BBE8500D60005 /* UIKit.framework in Frameworks */, 77317BAC181BBE8500D60005 /* Foundation.framework in Frameworks */, + 023DFC884FC1455E9522E9BF /* libPods-Juick.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -89,6 +96,7 @@ 77317BD3181BBE8500D60005 /* JuickTests */, 77317BAA181BBE8500D60005 /* Frameworks */, 77317BA9181BBE8500D60005 /* Products */, + AD52EBAFFD6B4395B342F246 /* Pods-Juick.xcconfig */, ); sourceTree = "<group>"; }; @@ -108,6 +116,7 @@ 77317BAD181BBE8500D60005 /* CoreGraphics.framework */, 77317BAF181BBE8500D60005 /* UIKit.framework */, 77317BCD181BBE8500D60005 /* XCTest.framework */, + E1A04338EB0146778B4503DC /* libPods-Juick.a */, ); name = Frameworks; sourceTree = "<group>"; @@ -117,13 +126,15 @@ children = ( 77317BBA181BBE8500D60005 /* AppDelegate.h */, 77317BBB181BBE8500D60005 /* AppDelegate.m */, - 77317BBD181BBE8500D60005 /* Main.storyboard */, 77317BC0181BBE8500D60005 /* MasterViewController.h */, 77317BC1181BBE8500D60005 /* MasterViewController.m */, - 77317BC3181BBE8500D60005 /* DetailViewController.h */, - 77317BC4181BBE8500D60005 /* DetailViewController.m */, 77317BC6181BBE8500D60005 /* Images.xcassets */, 77317BB2181BBE8500D60005 /* Supporting Files */, + 77D163C0181F048F00401EF0 /* MessageCell.h */, + 77D163C1181F048F00401EF0 /* MessageCell.m */, + 77A09548181F1F25002BDECD /* Message.h */, + 77A09549181F1F25002BDECD /* Message.m */, + 77A09568181F98D0002BDECD /* Main.storyboard */, ); path = Juick; sourceTree = "<group>"; @@ -164,9 +175,11 @@ isa = PBXNativeTarget; buildConfigurationList = 77317BDD181BBE8500D60005 /* Build configuration list for PBXNativeTarget "Juick" */; buildPhases = ( + 8C368BB4728E4484A53015A0 /* Check Pods Manifest.lock */, 77317BA4181BBE8500D60005 /* Sources */, 77317BA5181BBE8500D60005 /* Frameworks */, 77317BA6181BBE8500D60005 /* Resources */, + B3224023A642464D96AA14E2 /* Copy Pods Resources */, ); buildRules = ( ); @@ -233,9 +246,9 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 77A09569181F98D0002BDECD /* Main.storyboard in Resources */, 77317BC7181BBE8500D60005 /* Images.xcassets in Resources */, 77317BB6181BBE8500D60005 /* InfoPlist.strings in Resources */, - 77317BBF181BBE8500D60005 /* Main.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -249,15 +262,49 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 8C368BB4728E4484A53015A0 /* Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + B3224023A642464D96AA14E2 /* Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Pods-Juick-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 77317BA4181BBE8500D60005 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 77D163C2181F048F00401EF0 /* MessageCell.m in Sources */, 77317BBC181BBE8500D60005 /* AppDelegate.m in Sources */, + 77A0954A181F1F25002BDECD /* Message.m in Sources */, 77317BC2181BBE8500D60005 /* MasterViewController.m in Sources */, 77317BB8181BBE8500D60005 /* main.m in Sources */, - 77317BC5181BBE8500D60005 /* DetailViewController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -288,14 +335,6 @@ name = InfoPlist.strings; sourceTree = "<group>"; }; - 77317BBD181BBE8500D60005 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 77317BBE181BBE8500D60005 /* Base */, - ); - name = Main.storyboard; - sourceTree = "<group>"; - }; 77317BD6181BBE8500D60005 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( @@ -381,26 +420,40 @@ }; 77317BDE181BBE8500D60005 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = AD52EBAFFD6B4395B342F246 /* Pods-Juick.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "/Users/vt/Downloads/STV\\ 3.3.0\\ Lite/Static\\ Frameworks", + ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Juick/Juick-Prefix.pch"; INFOPLIST_FILE = "Juick/Juick-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = 1; WRAPPER_EXTENSION = app; }; name = Debug; }; 77317BDF181BBE8500D60005 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = AD52EBAFFD6B4395B342F246 /* Pods-Juick.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "/Users/vt/Downloads/STV\\ 3.3.0\\ Lite/Static\\ Frameworks", + ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Juick/Juick-Prefix.pch"; INFOPLIST_FILE = "Juick/Juick-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = 1; WRAPPER_EXTENSION = app; }; name = Release; @@ -466,6 +519,7 @@ 77317BDF181BBE8500D60005 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; 77317BE0181BBE8500D60005 /* Build configuration list for PBXNativeTarget "JuickTests" */ = { isa = XCConfigurationList; @@ -474,6 +528,7 @@ 77317BE2181BBE8500D60005 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/Juick.xcworkspace/contents.xcworkspacedata b/Juick.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..353d19d --- /dev/null +++ b/Juick.xcworkspace/contents.xcworkspacedata @@ -0,0 +1 @@ +<?xml version='1.0' encoding='UTF-8'?><Workspace version='1.0'><FileRef location='group:Juick.xcodeproj'/><FileRef location='group:Pods/Pods.xcodeproj'/></Workspace>
\ No newline at end of file diff --git a/Juick/AppDelegate.m b/Juick/AppDelegate.m index 40b5fae..23cef5e 100644 --- a/Juick/AppDelegate.m +++ b/Juick/AppDelegate.m @@ -7,12 +7,12 @@ // #import "AppDelegate.h" +#import "MasterViewController.h" @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - // Override point for customization after application launch. return YES; } diff --git a/Juick/Base.lproj/Main.storyboard b/Juick/Base.lproj/Main.storyboard deleted file mode 100644 index 3d5f90c..0000000 --- a/Juick/Base.lproj/Main.storyboard +++ /dev/null @@ -1,104 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4451" systemVersion="13A461" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="rS3-R9-Ivy"> - <dependencies> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3676"/> - </dependencies> - <scenes> - <!--Navigation Controller--> - <scene sceneID="cUi-kZ-frf"> - <objects> - <navigationController id="rS3-R9-Ivy" sceneMemberID="viewController"> - <navigationBar key="navigationBar" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="yXu-0R-QUA"> - <autoresizingMask key="autoresizingMask"/> - </navigationBar> - <connections> - <segue destination="pGg-6v-bdr" kind="relationship" relationship="rootViewController" id="RxB-wf-QIq"/> - </connections> - </navigationController> - <placeholder placeholderIdentifier="IBFirstResponder" id="eq9-QA-ai8" sceneMemberID="firstResponder"/> - </objects> - <point key="canvasLocation" x="-1" y="64"/> - </scene> - <!--class Prefix:identifier Master View Controller - Master--> - <scene sceneID="VgW-fR-Quf"> - <objects> - <tableViewController title="Master" id="pGg-6v-bdr" customClass="MasterViewController" sceneMemberID="viewController"> - <tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="mLL-gJ-YKr"> - <rect key="frame" x="0.0" y="0.0" width="320" height="568"/> - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> - <prototypes> - <tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="2pz-XF-uhl" style="IBUITableViewCellStyleDefault" id="m0d-ak-lc9"> - <rect key="frame" x="0.0" y="86" width="320" height="44"/> - <autoresizingMask key="autoresizingMask"/> - <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> - <rect key="frame" x="0.0" y="0.0" width="287" height="43"/> - <autoresizingMask key="autoresizingMask"/> - <subviews> - <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="2pz-XF-uhl"> - <rect key="frame" x="15" y="0.0" width="270" height="43"/> - <autoresizingMask key="autoresizingMask"/> - <fontDescription key="fontDescription" type="boldSystem" pointSize="20"/> - <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> - <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/> - </label> - </subviews> - <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> - </view> - <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> - <connections> - <segue destination="Ah7-4n-0Wa" kind="push" identifier="showDetail" id="jUr-3t-vfg"/> - </connections> - </tableViewCell> - </prototypes> - <sections/> - <connections> - <outlet property="dataSource" destination="pGg-6v-bdr" id="P41-gY-KXY"/> - <outlet property="delegate" destination="pGg-6v-bdr" id="Y6K-Cp-Qkv"/> - </connections> - </tableView> - <navigationItem key="navigationItem" title="Master" id="tQt-TN-PWz"/> - </tableViewController> - <placeholder placeholderIdentifier="IBFirstResponder" id="6Cn-md-YlS" sceneMemberID="firstResponder"/> - </objects> - <point key="canvasLocation" x="459" y="64"/> - </scene> - <!--class Prefix:identifier Detail View Controller - Detail--> - <scene sceneID="Cn3-H9-jdl"> - <objects> - <viewController title="Detail" id="Ah7-4n-0Wa" customClass="DetailViewController" sceneMemberID="viewController"> - <view key="view" contentMode="scaleToFill" id="MMQ-IT-qOo"> - <rect key="frame" x="0.0" y="0.0" width="320" height="568"/> - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> - <subviews> - <label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Detail view content goes here" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="Lei-5M-9Gs"> - <rect key="frame" x="20" y="276" width="280" height="17"/> - <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> - <fontDescription key="fontDescription" type="system" size="system"/> - <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> - <nil key="highlightedColor"/> - </label> - </subviews> - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> - <constraints> - <constraint firstItem="Lei-5M-9Gs" firstAttribute="leading" secondItem="MMQ-IT-qOo" secondAttribute="leading" constant="20" symbolic="YES" id="62x-JV-TTJ"/> - <constraint firstItem="Lei-5M-9Gs" firstAttribute="centerY" secondItem="MMQ-IT-qOo" secondAttribute="centerY" id="JzS-HC-Rnl"/> - <constraint firstAttribute="trailing" secondItem="Lei-5M-9Gs" secondAttribute="trailing" constant="20" symbolic="YES" id="pXB-RP-Zz6"/> - </constraints> - </view> - <navigationItem key="navigationItem" title="Detail" id="cra-N8-TIN"/> - <connections> - <outlet property="detailDescriptionLabel" destination="Lei-5M-9Gs" id="sCT-F7-F6f"/> - </connections> - </viewController> - <placeholder placeholderIdentifier="IBFirstResponder" id="lrm-kH-fPn" sceneMemberID="firstResponder"/> - </objects> - <point key="canvasLocation" x="902" y="64"/> - </scene> - </scenes> - <simulatedMetricsContainer key="defaultSimulatedMetrics"> - <simulatedStatusBarMetrics key="statusBar"/> - <simulatedOrientationMetrics key="orientation"/> - <simulatedScreenMetrics key="destination" type="retina4"/> - </simulatedMetricsContainer> -</document>
\ No newline at end of file diff --git a/Juick/DetailViewController.h b/Juick/DetailViewController.h deleted file mode 100644 index 1246805..0000000 --- a/Juick/DetailViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// DetailViewController.h -// Juick -// -// Created by Vitaly Takmazov on 26.10.13. -// Copyright (c) 2013 com.juick. All rights reserved. -// - -#import <UIKit/UIKit.h> - -@interface DetailViewController : UIViewController - -@property (strong, nonatomic) id detailItem; - -@property (weak, nonatomic) IBOutlet UILabel *detailDescriptionLabel; -@end diff --git a/Juick/DetailViewController.m b/Juick/DetailViewController.m deleted file mode 100644 index 4d510c9..0000000 --- a/Juick/DetailViewController.m +++ /dev/null @@ -1,51 +0,0 @@ -// -// DetailViewController.m -// Juick -// -// Created by Vitaly Takmazov on 26.10.13. -// Copyright (c) 2013 com.juick. All rights reserved. -// - -#import "DetailViewController.h" - -@interface DetailViewController () -- (void)configureView; -@end - -@implementation DetailViewController - -#pragma mark - Managing the detail item - -- (void)setDetailItem:(id)newDetailItem -{ - if (_detailItem != newDetailItem) { - _detailItem = newDetailItem; - - // Update the view. - [self configureView]; - } -} - -- (void)configureView -{ - // Update the user interface for the detail item. - - if (self.detailItem) { - self.detailDescriptionLabel.text = [self.detailItem description]; - } -} - -- (void)viewDidLoad -{ - [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. - [self configureView]; -} - -- (void)didReceiveMemoryWarning -{ - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -@end diff --git a/Juick/Juick-Info.plist b/Juick/Juick-Info.plist index 846633e..f23f598 100644 --- a/Juick/Juick-Info.plist +++ b/Juick/Juick-Info.plist @@ -24,6 +24,8 @@ <string>1.0</string> <key>LSRequiresIPhoneOS</key> <true/> + <key>NSMainNibFile~ipad</key> + <string>Main-iPad</string> <key>UIMainStoryboardFile</key> <string>Main</string> <key>UIRequiredDeviceCapabilities</key> diff --git a/Juick/Main.storyboard b/Juick/Main.storyboard new file mode 100644 index 0000000..cac2c7f --- /dev/null +++ b/Juick/Main.storyboard @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="12F45" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="Qpj-SN-g7s"> + <dependencies> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3746"/> + </dependencies> + <scenes> + <!--Master View Controller - Root View Controller--> + <scene sceneID="mFC-R0-94t"> + <objects> + <tableViewController id="zP3-J3-AlH" customClass="MasterViewController" sceneMemberID="viewController"> + <tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="xve-h9-u9y"> + <rect key="frame" x="0.0" y="0.0" width="320" height="568"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> + <prototypes> + <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="hPo-AH-JGS"> + <rect key="frame" x="0.0" y="86" width="320" height="44"/> + <autoresizingMask key="autoresizingMask"/> + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="hPo-AH-JGS" id="xzw-7U-vR0"> + <rect key="frame" x="0.0" y="0.0" width="320" height="43"/> + <autoresizingMask key="autoresizingMask"/> + </tableViewCellContentView> + </tableViewCell> + </prototypes> + </tableView> + <navigationItem key="navigationItem" title="Root View Controller" id="Fbj-Lo-jp7"/> + </tableViewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="IPJ-Mn-WGD" userLabel="First Responder" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="-463" y="-520"/> + </scene> + <!--Table View Controller--> + <scene sceneID="CD2-1U-nQh"> + <objects> + <tableViewController id="bNv-gr-Gk5" sceneMemberID="viewController"> + <tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="akB-3D-ShF"> + <rect key="frame" x="0.0" y="0.0" width="320" height="568"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> + <prototypes> + <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="7nM-K0-Cs7"> + <rect key="frame" x="0.0" y="22" width="320" height="44"/> + <autoresizingMask key="autoresizingMask"/> + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="7nM-K0-Cs7" id="9Oc-sb-RWf"> + <rect key="frame" x="0.0" y="0.0" width="320" height="43"/> + <autoresizingMask key="autoresizingMask"/> + </tableViewCellContentView> + </tableViewCell> + </prototypes> + <connections> + <outlet property="dataSource" destination="bNv-gr-Gk5" id="I2K-66-RJv"/> + <outlet property="delegate" destination="bNv-gr-Gk5" id="XnG-ma-SEL"/> + </connections> + </tableView> + </tableViewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="3Ep-3c-Tc4" userLabel="First Responder" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="75" y="-520"/> + </scene> + <!--Navigation Controller--> + <scene sceneID="x3r-t4-FOl"> + <objects> + <navigationController definesPresentationContext="YES" id="Qpj-SN-g7s" sceneMemberID="viewController"> + <navigationBar key="navigationBar" contentMode="scaleToFill" id="Kvi-Yn-XO9"> + <autoresizingMask key="autoresizingMask"/> + </navigationBar> + <connections> + <segue destination="zP3-J3-AlH" kind="relationship" relationship="rootViewController" id="Uza-Dn-uOg"/> + </connections> + </navigationController> + <placeholder placeholderIdentifier="IBFirstResponder" id="hiT-dp-hgn" userLabel="First Responder" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="-1153" y="-520"/> + </scene> + </scenes> + <simulatedMetricsContainer key="defaultSimulatedMetrics"> + <simulatedStatusBarMetrics key="statusBar"/> + <simulatedOrientationMetrics key="orientation"/> + <simulatedScreenMetrics key="destination" type="retina4"/> + </simulatedMetricsContainer> +</document>
\ No newline at end of file diff --git a/Juick/MasterViewController.h b/Juick/MasterViewController.h index be49967..a79b5c7 100644 --- a/Juick/MasterViewController.h +++ b/Juick/MasterViewController.h @@ -9,5 +9,4 @@ #import <UIKit/UIKit.h> @interface MasterViewController : UITableViewController - @end diff --git a/Juick/MasterViewController.m b/Juick/MasterViewController.m index 41b2ef5..bd75f82 100644 --- a/Juick/MasterViewController.m +++ b/Juick/MasterViewController.m @@ -6,108 +6,134 @@ // Copyright (c) 2013 com.juick. All rights reserved. // +#import "SWRevealViewController.h" + #import "MasterViewController.h" -#import "DetailViewController.h" +#import "MessageCell.h" + +#import "Message.h" + +static NSString *CellIdentifier = @"MessageCell"; @interface MasterViewController () { - NSMutableArray *_objects; + NSMutableArray *messages; } @end @implementation MasterViewController -- (void)awakeFromNib -{ - [super awakeFromNib]; -} - (void)viewDidLoad { [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. - self.navigationItem.leftBarButtonItem = self.editButtonItem; - - UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(insertNewObject:)]; - self.navigationItem.rightBarButtonItem = addButton; + self.title = @"Messages"; + // Change button color + + // Set the gesture + messages = [[NSMutableArray alloc] init]; + NSError *error; + NSURL *url = [NSURL URLWithString:@"http://api.juick.com/messages"]; + NSString *data = [NSString stringWithContentsOfURL:url encoding:NSUTF8StringEncoding error:&error]; + if (data == nil) { + NSLog(@"Download Error: %@", error); + return; + } + NSArray *resultObject = [NSJSONSerialization JSONObjectWithData:[data dataUsingEncoding:NSUTF8StringEncoding] options:kNilOptions error:&error]; + if (resultObject == nil) { + NSLog(@"JSON Error: %@", error); + return; + } + + for (NSDictionary *message in resultObject) { + Message *msg = [[Message alloc] initWithDictionary:message]; + [messages addObject:msg]; + } + //UINib *cellNib = [UINib nibWithNibName:@"MessageCell" bundle:nil]; + //[self.tableView registerNib:cellNib forCellReuseIdentifier:@"MessageCell"]; + [self.tableView registerClass:[MessageCell class] forCellReuseIdentifier:CellIdentifier]; + } -- (void)didReceiveMemoryWarning +- (void)viewDidAppear:(BOOL)animated { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. + [super viewDidAppear:animated]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(contentSizeCategoryChanged:) + name:UIContentSizeCategoryDidChangeNotification + object:nil]; } -- (void)insertNewObject:(id)sender +- (void)viewDidDisappear:(BOOL)animated { - if (!_objects) { - _objects = [[NSMutableArray alloc] init]; - } - [_objects insertObject:[NSDate date] atIndex:0]; - NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; - [self.tableView insertRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic]; + [super viewDidDisappear:animated]; + + [[NSNotificationCenter defaultCenter] removeObserver:self + name:UIContentSizeCategoryDidChangeNotification + object:nil]; } -#pragma mark - Table View - -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +- (void)didReceiveMemoryWarning { - return 1; + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. } -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +- (void)contentSizeCategoryChanged:(NSNotification *)notification { - return _objects.count; + [self.tableView reloadData]; } -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath]; - - NSDate *object = _objects[indexPath.row]; - cell.textLabel.text = [object description]; - return cell; +-(void) parserDidEndDocument:(NSXMLParser *)parser { + [self.tableView reloadData]; } -- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath -{ - // Return NO if you do not want the specified item to be editable. - return YES; +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; } -- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath -{ - if (editingStyle == UITableViewCellEditingStyleDelete) { - [_objects removeObjectAtIndex:indexPath.row]; - [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; - } else if (editingStyle == UITableViewCellEditingStyleInsert) { - // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view. - } +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return messages.count; } -/* -// Override to support rearranging the table view. -- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath -{ +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + MessageCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; + [cell updateFonts]; + Message *msg = [messages objectAtIndex:indexPath.row]; + cell.titleLabel.text = msg.user; + cell.bodyLabel.text = msg.text; + [cell setNeedsUpdateConstraints]; + return cell; } -*/ -/* -// Override to support conditional rearranging of the table view. -- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { - // Return NO if you do not want the item to be re-orderable. - return YES; + + MessageCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; + + [cell updateFonts]; + + Message *msg = [messages objectAtIndex:indexPath.row]; + cell.titleLabel.text = msg.user; + cell.bodyLabel.text = msg.text; + + cell.bodyLabel.preferredMaxLayoutWidth = tableView.bounds.size.width - (kLabelHorizontalInsets * 2.0f); + + [cell setNeedsUpdateConstraints]; + [cell updateConstraintsIfNeeded]; + [cell.contentView setNeedsLayout]; + [cell.contentView layoutIfNeeded]; + + CGFloat height = [cell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height; + + return height; } -*/ -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender +- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath { - if ([[segue identifier] isEqualToString:@"showDetail"]) { - NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow]; - NSDate *object = _objects[indexPath.row]; - [[segue destinationViewController] setDetailItem:object]; - } + return 500.0f; } + @end diff --git a/Juick/Message.h b/Juick/Message.h new file mode 100644 index 0000000..4ec31e6 --- /dev/null +++ b/Juick/Message.h @@ -0,0 +1,20 @@ +// +// Message.h +// Juick +// +// Created by Vitaly Takmazov on 29.10.13. +// Copyright (c) 2013 com.juick. All rights reserved. +// + +#import <Foundation/Foundation.h> +#import "NSString+HTML.h" + +@interface Message : NSObject + +@property(nonatomic, copy) NSDecimalNumber *MID; +@property(nonatomic, copy) NSDecimalNumber *RID; +@property(nonatomic, copy) NSString *user; +@property(nonatomic, copy) NSString *text; + +-(id) initWithDictionary:(NSDictionary *)dictionary; +@end diff --git a/Juick/Message.m b/Juick/Message.m new file mode 100644 index 0000000..e87834b --- /dev/null +++ b/Juick/Message.m @@ -0,0 +1,30 @@ +// +// Message.m +// Juick +// +// Created by Vitaly Takmazov on 29.10.13. +// Copyright (c) 2013 com.juick. All rights reserved. +// + +#import "Message.h" + +@implementation Message + +-(id)initWithDictionary:(NSDictionary *)dictionary +{ + Message *result = [[Message alloc] init]; + result.MID = [dictionary objectForKey:@"mid"]; + result.RID = [dictionary objectForKey:@"rid"]; + NSString *text = [[dictionary objectForKey:@"body"] stringByDecodingHTMLEntities]; + NSDictionary *userDict = [dictionary objectForKey:@"user"]; + result.user = [userDict objectForKey:@"uname"]; + NSArray *tagsArray = [dictionary objectForKey:@"tags"]; + if ([tagsArray count] > 0) { + result.text = [[NSString alloc] initWithFormat:@"%@\n%@", [tagsArray componentsJoinedByString:@", "], text]; + } else { + result.text = text; + } + return result; +} + +@end diff --git a/Juick/MessageCell.h b/Juick/MessageCell.h new file mode 100644 index 0000000..6f93048 --- /dev/null +++ b/Juick/MessageCell.h @@ -0,0 +1,21 @@ +// +// MessageCell.h +// Juick +// +// Created by Vitaly Takmazov on 29.10.13. +// Copyright (c) 2013 com.juick. All rights reserved. +// + +#import <UIKit/UIKit.h> + + +#define kLabelHorizontalInsets 20.0f + +@interface MessageCell : UITableViewCell + +@property (strong, nonatomic) IBOutlet UILabel *titleLabel; +@property (strong, nonatomic) IBOutlet UILabel *bodyLabel; + +- (void)updateFonts; + +@end diff --git a/Juick/MessageCell.m b/Juick/MessageCell.m new file mode 100644 index 0000000..a8b2522 --- /dev/null +++ b/Juick/MessageCell.m @@ -0,0 +1,134 @@ +// +// MessageCell.m +// Juick +// +// Created by Vitaly Takmazov on 29.10.13. +// Copyright (c) 2013 com.juick. All rights reserved. +// + +#import "MessageCell.h" + +@interface MessageCell () + +@property (nonatomic, assign) BOOL didSetupConstraints; + +@end + +@implementation MessageCell + +- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier +{ + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; + if (self) { + self.titleLabel = [[UILabel alloc] initWithFrame:CGRectZero]; + [self.titleLabel setTranslatesAutoresizingMaskIntoConstraints:NO]; + [self.titleLabel setLineBreakMode:NSLineBreakByTruncatingTail]; + [self.titleLabel setNumberOfLines:1]; + [self.titleLabel setTextAlignment:NSTextAlignmentLeft]; + [self.titleLabel setTextColor:[UIColor blackColor]]; + [self.titleLabel setBackgroundColor:[UIColor clearColor]]; + + self.bodyLabel = [[UILabel alloc] initWithFrame:CGRectZero]; + [self.bodyLabel setTranslatesAutoresizingMaskIntoConstraints:NO]; + [self.bodyLabel setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisVertical]; + [self.bodyLabel setLineBreakMode:NSLineBreakByTruncatingTail]; + [self.bodyLabel setNumberOfLines:0]; + [self.bodyLabel setTextAlignment:NSTextAlignmentLeft]; + [self.bodyLabel setTextColor:[UIColor darkGrayColor]]; + [self.bodyLabel setBackgroundColor:[UIColor clearColor]]; + [self.contentView addSubview:self.titleLabel]; + [self.contentView addSubview:self.bodyLabel]; + + [self updateFonts]; + } + return self; +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated +{ + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +- (void)updateConstraints { + [super updateConstraints]; + + if (self.didSetupConstraints) return; + + [self.contentView addConstraint:[NSLayoutConstraint + constraintWithItem:self.titleLabel + attribute:NSLayoutAttributeLeading + relatedBy:NSLayoutRelationEqual + toItem:self.contentView + attribute:NSLayoutAttributeLeading + multiplier:1.0f + constant:kLabelHorizontalInsets]]; + + [self.contentView addConstraint:[NSLayoutConstraint + constraintWithItem:self.titleLabel + attribute:NSLayoutAttributeTop + relatedBy:NSLayoutRelationEqual + toItem:self.contentView + attribute:NSLayoutAttributeTop + multiplier:1.0f + constant:(kLabelHorizontalInsets / 2)]]; + + [self.contentView addConstraint:[NSLayoutConstraint + constraintWithItem:self.titleLabel + attribute:NSLayoutAttributeTrailing + relatedBy:NSLayoutRelationEqual + toItem:self.contentView + attribute:NSLayoutAttributeTrailing + multiplier:1.0f + constant:-kLabelHorizontalInsets]]; + + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + [self.contentView addConstraint:[NSLayoutConstraint + constraintWithItem:self.bodyLabel + attribute:NSLayoutAttributeLeading + relatedBy:NSLayoutRelationEqual + toItem:self.contentView + attribute:NSLayoutAttributeLeading + multiplier:1.0f + constant:kLabelHorizontalInsets]]; + + [self.contentView addConstraint:[NSLayoutConstraint + constraintWithItem:self.bodyLabel + attribute:NSLayoutAttributeTop + relatedBy:NSLayoutRelationEqual + toItem:self.titleLabel + attribute:NSLayoutAttributeBottom + multiplier:1.0f + constant:(kLabelHorizontalInsets / 4)]]; + + [self.contentView addConstraint:[NSLayoutConstraint + constraintWithItem:self.bodyLabel + attribute:NSLayoutAttributeTrailing + relatedBy:NSLayoutRelationEqual + toItem:self.contentView + attribute:NSLayoutAttributeTrailing + multiplier:1.0f + constant:-kLabelHorizontalInsets]]; + + [self.contentView addConstraint:[NSLayoutConstraint + constraintWithItem:self.bodyLabel + attribute:NSLayoutAttributeBottom + relatedBy:NSLayoutRelationEqual + toItem:self.contentView + attribute:NSLayoutAttributeBottom + multiplier:1.0f + constant:-(kLabelHorizontalInsets / 2)]]; + + self.didSetupConstraints = YES; +} + + +- (void)updateFonts +{ + self.titleLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline]; + self.bodyLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody]; +} + +@end @@ -0,0 +1,11 @@ +# Uncomment this line to define a global platform for your project +platform :ios, "6.0" + +target "Juick" do +pod 'MWFeedParser' +end + +target "JuickTests" do + +end + diff --git a/Podfile.lock b/Podfile.lock new file mode 100644 index 0000000..5a89ae6 --- /dev/null +++ b/Podfile.lock @@ -0,0 +1,21 @@ +PODS: + - MWFeedParser (0.0.1): + - MWFeedParser/Feed + - MWFeedParser/NSDate+InternetDateTime + - MWFeedParser/NSString+HTML + - MWFeedParser/NSString+XMLEntities + - MWFeedParser/Feed (0.0.1) + - MWFeedParser/NSDate+InternetDateTime (0.0.1) + - MWFeedParser/NSString+HTML (0.0.1) + - MWFeedParser/NSString+XMLEntities (0.0.1) + - PKRevealController (2.0.5) + +DEPENDENCIES: + - MWFeedParser + - PKRevealController + +SPEC CHECKSUMS: + MWFeedParser: 2ca0852fac352f8333d5f46fdd4b583b921e0c4e + PKRevealController: 50a737bde432e51b68596d46b33617ec8bcb3a6a + +COCOAPODS: 0.27.1 |