首页 > 编程知识 正文

java怎么设置按钮的位置,java方法返回多个值

时间:2023-05-04 07:57:13 阅读:139555 作者:95

我在练习带导航栏的APP展。 使用UIBarButton从主画面移动到下一个画面。

uibutton * move left=[ uibuttonbuttonwithtype : uibuttontypecustom ];

[ moveleftsettitle : @ ' next screen ' forstate : uicontrolstatenormal ]

move left.title label.font=[ uifontfontwithname : @ ' Helvetica-bold ' size :12.0 f ];

[ move left.layersetcornerradius :4.0 f ]

[ move left.layersetborderwidth :1.0 f ]

[ move left.layersetbordercolor : [ [ uicolorredcolor ] CG color ];

move left.frame=cgrectmake (200,100.0,90.0,30.0 );

[ moveleftsettitlecolor : [ uicolorgreencolor ] forstate 3360 uicontrolstatenormal ]

[ moveleftaddtarget :自操作: @ selector (move to next ) forcontrolevents 3360 uicontroleventtouchupinside ]

uibarbuttonitem * bar button=[ [ uibarbuttonitemalloc ] initwithcustomview 3360 move left ];

self.navigation item.rightbarbuttonitem=bar button;

但是,现在第二个画面出现的时候,没有导航栏。 以下是此APP应用程序的屏幕截图

我也尝试了UIBarButton,但是第二个屏幕还没有导航栏。

uibarbuttonitem * back=[ [ uibarbuttonitemalloc ] initwithtitle : @ ' back ]

style : uibarbuttonitemstyleplain

目标: nil

动作: nil ];

selfnavigationitem setbackbarbuttonitem 3360 back;

我的问题是如何显示返回第二个画面的按钮? 我没有做任何定制按钮,但是默认情况下也不会自动进入。 请指导我。

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。