2

Ich zeige Schatten mit dem folgenden Code.Schatten von ViewController entfernen

UIBezierPath *shadowPath = [UIBezierPath bezierPathWithRect:CGRectMake(317, 0, 1, self.navigationController.view.frame.size.height)]; 
     self.navigationController.view.superview.layer.masksToBounds = NO; 
     self.navigationController.view.layer.shadowColor = [UIColor blackColor].CGColor; 
     self.navigationController.view.layer.shadowOffset = CGSizeMake(3, 0); /*Change value of X n Y as per your need of shadow to appear to like right bottom or left bottom or so on*/ 
     self.navigationController.view.layer.shadowOpacity = 0.5f; 
     self.navigationController.view.layer.shadowPath = shadowPath.CGPath; 

Ich möchte diesen Schatten entfernen.Ich habe etwas versucht, aber nicht funktioniert? Jede Hilfe wird geschätzt.

Antwort

0

Versuch von balckColor zu Clear und Opazität auf 0,0

self.navigationController.view.layer.shadowColor = [UIColor clearColor].CGColor; 
self.navigationController.view.layer.shadowOpacity = 0.0f; 
+0

Das funktionierte für mich! Danke ...... – Nikhil

+0

Willkommen @Nikhil und ja danke für die Annahme der Antwort. –

0

ersetzen können Sie nicht nur Opazität auf 0.0 gesetzt.

self.navigationController.view.layer.shadowOpacity = 0.0; 

Danke !!

Verwandte Themen