Skip to content

Commit

Permalink
Fixed presenting UIAlertController while using search functionality o…
Browse files Browse the repository at this point in the history
…n iOS. (#146)

Fixed presenting UIAlertController while using search functionality on iOS that lead to a crash
  • Loading branch information
krzysztofpelczarinfullmobile authored and felipeflorencio committed Feb 10, 2019
1 parent 48056a9 commit 04df5ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion netfox/Core/NFXGenericController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class NFXGenericController: NFXViewController
{
super.viewDidLoad()
#if os(iOS)
self.edgesForExtendedLayout = UIRectEdge()
self.edgesForExtendedLayout = UIRectEdge.all
self.view.backgroundColor = NFXColor.NFXGray95Color()
#elseif os(OSX)
self.view.wantsLayer = true
Expand Down
5 changes: 3 additions & 2 deletions netfox/iOS/NFXListController_iOS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class NFXListController_iOS: NFXListController, UITableViewDelegate, UITableView
{
super.viewDidLoad()

self.edgesForExtendedLayout = UIRectEdge()
self.extendedLayoutIncludesOpaqueBars = false
self.edgesForExtendedLayout = UIRectEdge.all
self.extendedLayoutIncludesOpaqueBars = true
self.automaticallyAdjustsScrollViewInsets = false

self.tableView.frame = self.view.frame
Expand Down Expand Up @@ -62,6 +62,7 @@ class NFXListController_iOS: NFXListController, UITableViewDelegate, UITableView

if #available(iOS 11.0, *) {
self.navigationItem.searchController = self.searchController
self.definesPresentationContext = true
} else {
let searchView = UIView()
searchView.frame = CGRect(x: 0, y: 0, width: self.view.frame.width - 60, height: 0)
Expand Down

0 comments on commit 04df5ac

Please sign in to comment.