开发者

Can I use UIBarButtonSystemItemCamera somewhere in my view and not in my Navigation Bar?

开发者 https://www.devze.com 2023-03-19 02:46 出处:网络
So I can add a Camera button on my UINavigationBar with UIBarButtonSystemItemCamera. I want to add the same button to somewhere in the center of my view (120, 160, 10, 10).

So I can add a Camera button on my UINavigationBar with UIBarButtonSystemItemCamera.

I want to add the same button to somewhere in the center of my view (120, 160, 10, 10).

Can I use it like a UIButton and use that camera button or should I just create my custom button (which looks like the UIBarButtonSystemItemCamera) and u开发者_如何学Gose the same methods for it ?


my suggestion is create UIButton with that camera image(which is in google image) then set the size as u needed then add it to ur view

because the UIBarButtonItem is Not inherited from UIView .it is from NSObject.

so u can't add them to ur View.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号