Skip to content

Commit

Permalink
Show scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
lm2343635 committed Mar 28, 2020
1 parent ad67f29 commit c5fb21f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Example/Pluto-Example/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -205,17 +205,26 @@
<action selector="refresh:" destination="PkW-NZ-hv0" eventType="touchUpInside" id="xBy-qd-DJS"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eZk-UD-zl9">
<rect key="frame" x="142" y="559" width="91" height="30"/>
<state key="normal" title="Show scopes"/>
<connections>
<action selector="showScopes:" destination="PkW-NZ-hv0" eventType="touchUpInside" id="EJF-HF-nEk"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="CDx-vy-hRh" firstAttribute="centerX" secondItem="uSB-pY-S7p" secondAttribute="centerX" id="5YR-7T-YwG"/>
<constraint firstItem="zqu-ew-yj6" firstAttribute="top" secondItem="eZk-UD-zl9" secondAttribute="bottom" constant="8" id="G2a-vJ-ACb"/>
<constraint firstItem="xCI-fA-ZZv" firstAttribute="top" secondItem="zqu-ew-yj6" secondAttribute="bottom" constant="20" id="Ikr-Nx-P2J"/>
<constraint firstItem="zqu-ew-yj6" firstAttribute="centerX" secondItem="uSB-pY-S7p" secondAttribute="centerX" id="J4Z-WN-cCr"/>
<constraint firstItem="Msv-gz-y1P" firstAttribute="centerX" secondItem="uSB-pY-S7p" secondAttribute="centerX" id="Zoy-zM-AUf"/>
<constraint firstItem="K7D-96-cJJ" firstAttribute="centerX" secondItem="uSB-pY-S7p" secondAttribute="centerX" id="aM6-aQ-dXP"/>
<constraint firstItem="CDx-vy-hRh" firstAttribute="top" secondItem="sMq-pN-e1s" secondAttribute="bottom" constant="32" id="bfL-nj-xYJ"/>
<constraint firstItem="Msv-gz-y1P" firstAttribute="top" secondItem="CDx-vy-hRh" secondAttribute="bottom" constant="22" id="hU8-pq-j1X"/>
<constraint firstItem="K7D-96-cJJ" firstAttribute="top" secondItem="Msv-gz-y1P" secondAttribute="bottom" constant="8" id="rE9-9T-4rc"/>
<constraint firstItem="eZk-UD-zl9" firstAttribute="centerX" secondItem="uSB-pY-S7p" secondAttribute="centerX" id="yoB-Qr-DBO"/>
</constraints>
</view>
<navigationItem key="navigationItem" title="Pluto" id="Xyp-lr-N8S"/>
Expand Down
6 changes: 6 additions & 0 deletions Example/Pluto-Example/UserViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ class UserViewController: UIViewController {
}
}

@IBAction func showScopes(_ sender: Any) {
Pluto.shared.getScopes { [weak self] in
self?.showAlert(title: "scopes", content: $0.description)
}
}

private func set(user: PlutoUser) {
avatarImageView.kf.setImage(with: URL(string: user.avatar))
emailLabel.text = user.mail
Expand Down

0 comments on commit c5fb21f

Please sign in to comment.