Skip to content
Browse files

Update iOS demo app with new article properties

  • Loading branch information...
1 parent 937cd1a commit 7725a85832509658bcf77fa307e5fbf86fbeb3b9 @vtourraine vtourraine committed Apr 11, 2013
View
9 Examples/SZNAltmetricDemo/SZNAltmetricDemo/classes/SZNArticleViewController.h
@@ -38,4 +38,13 @@
@property (weak, nonatomic) IBOutlet UILabel *scienceBlogsLabel;
@property (weak, nonatomic) IBOutlet UILabel *googlePlusLabel;
+@property (weak, nonatomic) IBOutlet UILabel *readersMendeleyLabel;
+@property (weak, nonatomic) IBOutlet UILabel *readersCiteULikeLabel;
+@property (weak, nonatomic) IBOutlet UILabel *readersConnoteaLabel;
+
+@property (weak, nonatomic) IBOutlet UILabel *subjectsLabel;
+@property (weak, nonatomic) IBOutlet UILabel *scopusSubjectsLabel;
+
+@property (weak, nonatomic) IBOutlet UILabel *quotesLabel;
+
@end
View
11 Examples/SZNAltmetricDemo/SZNAltmetricDemo/classes/SZNArticleViewController.m
@@ -23,7 +23,7 @@ - (void)viewDidLoad
{
[super viewDidLoad];
((UIScrollView *)self.view).alwaysBounceVertical = YES;
- ((UIScrollView *)self.view).contentSize = CGSizeMake(self.view.frame.size.width, self.googlePlusLabel.frame.origin.y + 70);
+ ((UIScrollView *)self.view).contentSize = CGSizeMake(self.view.frame.size.width, self.quotesLabel.frame.origin.y + 120);
[self configureViewWithArticle:self.article];
}
@@ -60,6 +60,15 @@ - (void)configureViewWithArticle:(SZNAltmetricArticle *)article
self.facebookUsersLabel.text = [article.citedByFacebookWallsCount stringValue];
self.scienceBlogsLabel.text = [article.citedByFeedsCount stringValue];
self.googlePlusLabel.text = [article.citedByGooglePlusCount stringValue];
+
+ self.readersMendeleyLabel.text = [article.readers[@"mendeley"] stringValue];
+ self.readersCiteULikeLabel.text = [article.readers[@"citeulike"] stringValue];
+ self.readersConnoteaLabel.text = [article.readers[@"connotea"] stringValue];
+
+ self.subjectsLabel.text = [article.subjects componentsJoinedByString:@", "];
+ self.scopusSubjectsLabel.text = [article.scopusSubjects componentsJoinedByString:@", "];
+
+ self.quotesLabel.text = [article.quotes componentsJoinedByString:@"\n"];
}
@end
View
149 Examples/SZNAltmetricDemo/SZNAltmetricDemo/en.lproj/MainStoryboard.storyboard
@@ -59,7 +59,7 @@
<objects>
<viewController id="XpV-6B-Fne" customClass="SZNArticleViewController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="YhW-cc-YbQ" customClass="UIScrollView">
- <rect key="frame" x="0.0" y="64" width="320" height="800"/>
+ <rect key="frame" x="0.0" y="64" width="320" height="1050"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Altmetric ID:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="wYA-Sh-47O">
@@ -248,58 +248,159 @@
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Tweeters:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="0Us-T1-xAU">
- <rect key="frame" x="20" y="617" width="91" height="20"/>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="tweeters" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="0Us-T1-xAU">
+ <rect key="frame" x="76" y="645" width="224" height="20"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="13"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="####" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="1nR-0a-lED">
+ <rect key="frame" x="20" y="645" width="48" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Facebook users" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="5m5-MM-HNi">
+ <rect key="frame" x="76" y="667" width="224" height="20"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="13"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="####" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="2m2-q7-fhF">
+ <rect key="frame" x="20" y="667" width="48" height="20"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="science blogs" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="rFF-Xx-sER">
+ <rect key="frame" x="76" y="689" width="224" height="20"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="####" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="1nR-0a-lED">
- <rect key="frame" x="119" y="617" width="181" height="20"/>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="####" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="wfr-yG-vfL">
+ <rect key="frame" x="20" y="689" width="48" height="20"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Google+ users" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="gYi-HF-hlv">
+ <rect key="frame" x="76" y="711" width="224" height="20"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="13"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="####" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="5BX-pc-cDz">
+ <rect key="frame" x="20" y="711" width="48" height="20"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Facebook users:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="5m5-MM-HNi">
- <rect key="frame" x="14" y="639" width="97" height="20"/>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Mentioned by:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="VSY-Mi-f1S">
+ <rect key="frame" x="20" y="617" width="280" height="20"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="15"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Mendeley" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="wqv-d0-ypA">
+ <rect key="frame" x="76" y="780" width="224" height="20"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="13"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="####" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="YGn-ih-DHr">
+ <rect key="frame" x="20" y="780" width="48" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="CiteULike" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="RK2-pD-r6E">
+ <rect key="frame" x="76" y="802" width="224" height="20"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="####" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="2m2-q7-fhF">
- <rect key="frame" x="119" y="639" width="181" height="20"/>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="####" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="yHn-WE-s3C">
+ <rect key="frame" x="20" y="802" width="48" height="20"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Connotea" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="NNd-WE-gsW">
+ <rect key="frame" x="76" y="824" width="224" height="20"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="13"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="####" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="klA-dr-ruE">
+ <rect key="frame" x="20" y="824" width="48" height="20"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="science blogs:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="rFF-Xx-sER">
- <rect key="frame" x="20" y="661" width="91" height="20"/>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Readers on:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="IfM-vW-cZY">
+ <rect key="frame" x="20" y="752" width="280" height="20"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="15"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Subjects:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="9Bu-nM-PL6">
+ <rect key="frame" x="20" y="864" width="91" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="####" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="wfr-yG-vfL">
- <rect key="frame" x="119" y="661" width="181" height="20"/>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="####" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="uBH-6q-5FJ">
+ <rect key="frame" x="119" y="864" width="181" height="20"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Google+ users:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="gYi-HF-hlv">
- <rect key="frame" x="20" y="683" width="91" height="20"/>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Scopus:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="key-C8-r5s">
+ <rect key="frame" x="12" y="886" width="99" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="####" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="5BX-pc-cDz">
- <rect key="frame" x="119" y="683" width="181" height="20"/>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="####" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ng5-Ge-vHb">
+ <rect key="frame" x="119" y="886" width="181" height="20"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Quotes:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="9gU-mt-csZ">
+ <rect key="frame" x="12" y="926" width="288" height="20"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="13"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="6Nu-aa-Vor">
+ <rect key="frame" x="12" y="948" width="288" height="82"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+ <string key="text">####
+####
+####</string>
<fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
@@ -325,15 +426,21 @@
<outlet property="lastUpdatedLabel" destination="aLp-gP-Jfy" id="Qp5-le-nF2"/>
<outlet property="pubMedIdentifierLabel" destination="7Sz-Nj-ofM" id="ZnY-HG-qSl"/>
<outlet property="publishedOnLabel" destination="OWB-8A-Ne6" id="8ca-dK-c9W"/>
+ <outlet property="quotesLabel" destination="6Nu-aa-Vor" id="EXf-Tq-uvp"/>
+ <outlet property="readersCiteULikeLabel" destination="yHn-WE-s3C" id="B3q-kX-Kn6"/>
+ <outlet property="readersConnoteaLabel" destination="klA-dr-ruE" id="mIX-6I-gxP"/>
+ <outlet property="readersMendeleyLabel" destination="YGn-ih-DHr" id="7AG-5F-zrM"/>
<outlet property="scienceBlogsLabel" destination="wfr-yG-vfL" id="rXf-EA-qEC"/>
+ <outlet property="scopusSubjectsLabel" destination="ng5-Ge-vHb" id="Q5z-54-YHy"/>
<outlet property="scoreLabel" destination="4GO-6u-g0G" id="0Il-Rn-Bsl"/>
+ <outlet property="subjectsLabel" destination="uBH-6q-5FJ" id="HTN-Mm-6JD"/>
<outlet property="titleLabel" destination="xnC-62-9CF" id="xdn-OF-Sd7"/>
<outlet property="tweetersLabel" destination="1nR-0a-lED" id="vEC-5Z-ycl"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="ece-e8-NeC" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
- <point key="canvasLocation" x="1455" y="113"/>
+ <point key="canvasLocation" x="1473" y="13"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="547-mA-1Uj">
@@ -373,8 +480,14 @@
<relationship kind="outlet" name="lastUpdatedLabel" candidateClass="UILabel"/>
<relationship kind="outlet" name="pubMedIdentifierLabel" candidateClass="UILabel"/>
<relationship kind="outlet" name="publishedOnLabel" candidateClass="UILabel"/>
+ <relationship kind="outlet" name="quotesLabel" candidateClass="UILabel"/>
+ <relationship kind="outlet" name="readersCiteULikeLabel" candidateClass="UILabel"/>
+ <relationship kind="outlet" name="readersConnoteaLabel" candidateClass="UILabel"/>
+ <relationship kind="outlet" name="readersMendeleyLabel" candidateClass="UILabel"/>
<relationship kind="outlet" name="scienceBlogsLabel" candidateClass="UILabel"/>
+ <relationship kind="outlet" name="scopusSubjectsLabel" candidateClass="UILabel"/>
<relationship kind="outlet" name="scoreLabel" candidateClass="UILabel"/>
+ <relationship kind="outlet" name="subjectsLabel" candidateClass="UILabel"/>
<relationship kind="outlet" name="titleLabel" candidateClass="UILabel"/>
<relationship kind="outlet" name="tweetersLabel" candidateClass="UILabel"/>
</relationships>

0 comments on commit 7725a85

Please sign in to comment.
Something went wrong with that request. Please try again.