DGElasticPullToRefresh icon indicating copy to clipboard operation
DGElasticPullToRefresh copied to clipboard

Faint line between DGElasticPullToRefresh and Nav Bar

Open MartinQue opened this issue 8 years ago • 7 comments

When i pull to refresh, i see a faint line, probably the Nav Bar's border line. While on your display view example, there isn't any line separating the DGElasticPullToRefresh from the Navigation Bar. Thanks in advance :)

MartinQue avatar Mar 16 '16 22:03 MartinQue

@MartinQue ever solved this? I have the same

koloritcm avatar Apr 14 '16 18:04 koloritcm

@gunnarblom haven't solved it yet. Any luck on your side?

MartinQue avatar Apr 23 '16 11:04 MartinQue

@MartinQue Yep, add this in viewDidLoad or similar before setting up the pull to refresh:

let view = UIView()
view.backgroundColor = self.navigationController!.navigationBar.barTintColor
var rect = view.frame
rect.origin.x = 0
rect.origin.y = self.navigationController!.navigationBar.frame.size.height
rect.size.width = self.navigationController!.navigationBar.frame.size.width
rect.size.height = 1
view.frame = rect
self.navigationController!.navigationBar.addSubview(view)

koloritcm avatar May 01 '16 14:05 koloritcm

Works perfect

MartinQue avatar May 06 '16 01:05 MartinQue

Another solution, in viewDidLoad() set navigationBar.clipsToBounds = true.

maxmouchet avatar May 26 '16 20:05 maxmouchet

You can remove that shadow completely from your app with:

UINavigationBar.appearance().shadowImage = UIImage()

Just add it to your AppDelegate file:

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

    UINavigationBar.appearance().shadowImage = UIImage()

    return true
}

zrkb avatar Jun 10 '16 02:06 zrkb

Neither...

UINavigationBar.appearance().shadowImage = UIImage()

or

navigationBar.clipsToBounds = true

...works for me. Only the addSubview() method I posted above.

koloritcm avatar Jun 17 '16 18:06 koloritcm