1. <tfoot id='K3y8a'></tfoot>
    2. <legend id='K3y8a'><style id='K3y8a'><dir id='K3y8a'><q id='K3y8a'></q></dir></style></legend>

        <small id='K3y8a'></small><noframes id='K3y8a'>

      1. <i id='K3y8a'><tr id='K3y8a'><dt id='K3y8a'><q id='K3y8a'><span id='K3y8a'><b id='K3y8a'><form id='K3y8a'><ins id='K3y8a'></ins><ul id='K3y8a'></ul><sub id='K3y8a'></sub></form><legend id='K3y8a'></legend><bdo id='K3y8a'><pre id='K3y8a'><center id='K3y8a'></center></pre></bdo></b><th id='K3y8a'></th></span></q></dt></tr></i><div id='K3y8a'><tfoot id='K3y8a'></tfoot><dl id='K3y8a'><fieldset id='K3y8a'></fieldset></dl></div>
          <bdo id='K3y8a'></bdo><ul id='K3y8a'></ul>

        iOS - UIPageControl 上的 UIButton 不起作用

        时间:2023-07-07

        <i id='dy9Yv'><tr id='dy9Yv'><dt id='dy9Yv'><q id='dy9Yv'><span id='dy9Yv'><b id='dy9Yv'><form id='dy9Yv'><ins id='dy9Yv'></ins><ul id='dy9Yv'></ul><sub id='dy9Yv'></sub></form><legend id='dy9Yv'></legend><bdo id='dy9Yv'><pre id='dy9Yv'><center id='dy9Yv'></center></pre></bdo></b><th id='dy9Yv'></th></span></q></dt></tr></i><div id='dy9Yv'><tfoot id='dy9Yv'></tfoot><dl id='dy9Yv'><fieldset id='dy9Yv'></fieldset></dl></div>
            <bdo id='dy9Yv'></bdo><ul id='dy9Yv'></ul>
          • <small id='dy9Yv'></small><noframes id='dy9Yv'>

              <tbody id='dy9Yv'></tbody>
            <legend id='dy9Yv'><style id='dy9Yv'><dir id='dy9Yv'><q id='dy9Yv'></q></dir></style></legend>

              <tfoot id='dy9Yv'></tfoot>
                1. 本文介绍了iOS - UIPageControl 上的 UIButton 不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我使用 UIPageControl 作为应用程序不同页面(视图控制器)之间的指示器.在每个视图控制器中,我需要在 UIPageControl 的左角有一个不同的按钮.如果我在每个视图控制器的该位置放置一个 UIButton,我会在 UIPageControl 上看到它,但按钮不会响应触摸事件.有什么我想念的吗?或者有没有其他方法可以做到这一点?谢谢.

                  I am using UIPageControl as indicator between different page (view controllers) of my application. In each of the view controllers, I need to have a different button on the left corner on the UIPageControl. If I place a UIButton at that position on each of the view controllers, I see it on the UIPageControl but the buttons do not respond to the touch event. Is there something I am missing? Or is there an alternative to do this? Thanks.

                  推荐答案

                  我猜页面控件和视图控制器视图都是同一个视图的子视图.在这种情况下,按钮被绘制在视图控制器视图边界之外.默认情况下允许这样做,但它确实具有无法点击按钮的副作用,因为超级视图不处理触摸.

                  I guess the page control and the view controller view are both subviews of the same view. In this case, the button is drawn outside of the view controllers view bounds. This is allowed by default, but it does have the side effect that the button can't be tapped on as the superview doesn't handle the touch.

                  您应该拥有超级"视图控制器(拥有包含页面控件和子视图控制器的根视图的控制器)拥有的页面控件上的按钮.然后,当一个按钮被点击时,它应该告诉子视图控制器它可以采取适当的行动.

                  You should have the buttons on the page control owned by the 'super' view controller (the controller that owns the root view containing the page control and the child view controllers). Then, when a button is tapped it should tell the child view controller about it so that it can take the appropriate action.

                  这篇关于iOS - UIPageControl 上的 UIButton 不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:单击目标 c 中的按钮更改图像 下一篇:使用单元格按钮操作传递多个参数

                  相关文章

                  <legend id='WUGUw'><style id='WUGUw'><dir id='WUGUw'><q id='WUGUw'></q></dir></style></legend>
                    <bdo id='WUGUw'></bdo><ul id='WUGUw'></ul>

                  1. <i id='WUGUw'><tr id='WUGUw'><dt id='WUGUw'><q id='WUGUw'><span id='WUGUw'><b id='WUGUw'><form id='WUGUw'><ins id='WUGUw'></ins><ul id='WUGUw'></ul><sub id='WUGUw'></sub></form><legend id='WUGUw'></legend><bdo id='WUGUw'><pre id='WUGUw'><center id='WUGUw'></center></pre></bdo></b><th id='WUGUw'></th></span></q></dt></tr></i><div id='WUGUw'><tfoot id='WUGUw'></tfoot><dl id='WUGUw'><fieldset id='WUGUw'></fieldset></dl></div>
                    <tfoot id='WUGUw'></tfoot>
                  2. <small id='WUGUw'></small><noframes id='WUGUw'>