1

since iOS 7 my textField will not get "shadowed" as it did in earlier versions of iOS automatically. I would like to add an innerShadow in the textfield. Which is the best approach to do so since iOS 7 ? The code below is how i code my textField. You can see the difference between iOS 7 and iOS 6 here: http://tinypic.com/view.php?pic=2ufewx0&s=5#.Uksu6hbU-8V

 UITextField* sbTextField;

    //[sbTextField removeFromSuperview];
    for (UIView *subView in self.searchBar.subviews){
        for (UIView *ndLeveSubView in subView.subviews){

            if ([ndLeveSubView isKindOfClass:[UITextField class]])
            {
                sbTextField = (UITextField *)ndLeveSubView;

                sbTextField.backgroundColor =[UIColor whiteColor];

                self.navigationItem.titleView = sbTextField;
                self.navigationItem.rightBarButtonItem =  menuButton;
                // [sbTextField removeFromSuperview];

                break;
            }

        }

    }
4

1 回答 1

0

您可以尝试这种方法并使半径为负(我只是在猜测)。此外,如果它在动画的超级视图中(例如表格视图),这可能会导致渲染问题并使其非常慢。

于 2013-10-01T20:36:53.657 回答