Skip to content

Commit

Permalink
Refresh TableView on reload
Browse files Browse the repository at this point in the history
  • Loading branch information
Dev1an committed Apr 13, 2018
1 parent 5004e93 commit e3bbdeb
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion IP Setup/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
splitViewController.delegate = self

do {
manager = try Manager {
manager = try Manager(on: DispatchQueue.global(qos: .userInitiated)) {
print($0)
}
} catch {
Expand Down
23 changes: 15 additions & 8 deletions IP Setup/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
<viewLayoutGuide key="safeArea" id="VUw-jc-0yf"/>
</view>
<toolbarItems/>
<navigationItem key="navigationItem" title="Detail" id="mOI-FS-AaM"/>
<navigationItem key="navigationItem" title="Configuration" id="mOI-FS-AaM"/>
<connections>
<outlet property="dns1" destination="SHp-aW-hhN" id="CKe-c2-CLl"/>
<outlet property="dns2" destination="F1G-CH-ZX0" id="uPf-io-Rgo"/>
Expand Down Expand Up @@ -249,19 +249,26 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="Arm-wq-HPj" style="IBUITableViewCellStyleDefault" id="WCw-Qf-5nD">
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="Arm-wq-HPj" detailTextLabel="SRi-LU-MIh" style="IBUITableViewCellStyleSubtitle" id="WCw-Qf-5nD">
<rect key="frame" x="0.0" y="28" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="WCw-Qf-5nD" id="37f-cq-3Eg">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
<rect key="frame" x="0.0" y="0.0" width="341" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Arm-wq-HPj">
<rect key="frame" x="16" y="0.0" width="343" height="43.5"/>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Arm-wq-HPj">
<rect key="frame" x="16" y="5" width="33.5" height="20.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Subtitle" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="SRi-LU-MIh">
<rect key="frame" x="16" y="25.5" width="44" height="14.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
Expand All @@ -277,7 +284,7 @@
<outlet property="delegate" destination="7bK-jq-Zjz" id="RA6-mI-bju"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="Master" id="Zdf-7t-Un8"/>
<navigationItem key="navigationItem" title="Devices" id="Zdf-7t-Un8"/>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Rux-fX-hf1" sceneMemberID="firstResponder"/>
</objects>
Expand Down
1 change: 1 addition & 0 deletions IP Setup/MasterViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class MasterViewController: UITableViewController {
@objc func searchCameras(_ sender: Any?) {
do {
objects.removeAll(keepingCapacity: true)
tableView.reloadData()
try manager?.search()
print("DiscoveryMessage is sent")
} catch {
Expand Down
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ macOS & iOS application to discover and configure network settings of Panasonic

| Swift | Xcode |
| ------------------------------------------------------------ | ----- |
| ```Apple Swift version 4.1 (swiftlang-902.0.48 clang-902.0.37.1)``` | ```Version 9.3 (9E145)``` |
| ``` Target: x86_64-apple-darwin17.5.0 ``` | ```macOS 10.13.4 (17E199)``` |
| `Apple Swift version 4.1 (swiftlang-902.0.48 clang-902.0.37.1)` | `Version 9.3 (9E145)` |
| `Target: x86_64-apple-darwin17.5.0` | `macOS 10.13.4 (17E199)` |

To start developing clone this repo with all its submodules
```shell
Expand Down

0 comments on commit e3bbdeb

Please sign in to comment.