-
Notifications
You must be signed in to change notification settings - Fork 483
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement swift auth customization controllers
- Loading branch information
1 parent
b953da9
commit 294601f
Showing
16 changed files
with
1,253 additions
and
48 deletions.
There are no files selected for viewing
104 changes: 79 additions & 25 deletions
104
samples/swift/FirebaseUI-demo-swift.xcodeproj/project.pbxproj
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
samples/swift/FirebaseUI-demo-swift/Samples/Auth/FIRCustomAuthPickerViewController.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// Copyright (c) 2016 Google Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
import UIKit | ||
import FirebaseAuthUI | ||
|
||
@objc(FIRCustomAuthPickerViewController) | ||
|
||
class FIRCustomAuthPickerViewController: FIRAuthPickerViewController { | ||
|
||
@IBAction func onClose(_ sender: AnyObject) { | ||
self.cancelAuthorization() | ||
} | ||
|
||
} |
39 changes: 39 additions & 0 deletions
39
samples/swift/FirebaseUI-demo-swift/Samples/Auth/FIRCustomAuthPickerViewController.xib
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11201" systemVersion="15G1004" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> | ||
<dependencies> | ||
<deployment identifier="iOS"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/> | ||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<objects> | ||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="FIRCustomAuthPickerViewController" customModule="FirebaseUI_demo_swift" customModuleProvider="target"> | ||
<connections> | ||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> | ||
</connections> | ||
</placeholder> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> | ||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT"> | ||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<subviews> | ||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="VxO-Mp-NxI"> | ||
<color key="backgroundColor" name="selectedKnobColor" catalog="System" colorSpace="catalog"/> | ||
<state key="normal" title="Cancel"> | ||
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
</state> | ||
<connections> | ||
<action selector="onClose:" destination="-1" eventType="touchUpInside" id="oXy-b9-wIa"/> | ||
</connections> | ||
</button> | ||
</subviews> | ||
<color key="backgroundColor" name="knobColor" catalog="System" colorSpace="catalog"/> | ||
<constraints> | ||
<constraint firstItem="VxO-Mp-NxI" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leadingMargin" id="0gC-XW-7T5"/> | ||
<constraint firstItem="VxO-Mp-NxI" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="109" id="Sej-IC-Sc9"/> | ||
<constraint firstAttribute="trailing" secondItem="VxO-Mp-NxI" secondAttribute="trailing" constant="16" id="cqe-Rw-f8d"/> | ||
</constraints> | ||
<point key="canvasLocation" x="25.5" y="-79.5"/> | ||
</view> | ||
</objects> | ||
</document> |
Oops, something went wrong.