我有一个视图,在代码中执行其子视图的布局.布局对于自动布局来说太复杂,并且自动布局会破坏布局代码.有没有办法强制自动布局单独保留此视图的子视图?我试过覆盖layoutSubviews,但没有快乐.
谢谢你的帮助.
当在跳板上使用语音转换时,当选择屏幕底部的UIPageControl时,VoiceOver会宣布类似"第1页,共5页可调整"的内容.并且用户可以向上和向下滑动以更改页面.
在我的应用程序中,我没有得到"可调整"部分,并且无法通过滑动更改页面.
我有什么想法解决这个问题?它显然会破坏应用程序的可用性.
苹果关于该协议的文档提到了accessibilityPerformEscape
“在可以模态或层次结构显示的元素或包含视图上实现此方法。当 VoiceOver 用户执行关闭操作时,此方法将关闭视图。例如,您可以为弹出窗口实现此方法,以便给出用户故意执行关闭弹出窗口的关闭操作。”
我找不到任何有关解雇行动的信息。有人有任何线索吗?
在模拟器上运行时没有问题,但通知未在设备上发布(iPad 3和Mini都运行iOS 6).如果我自己发布通知,则会调用处理程序.我想知道你们中是否有人碰到这个并且有任何想法.
以下是设置处理程序的代码:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(iPadEditSetTitleHandleKeyboardDidShowNotification:) name:UIKeyboardDidShowNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(iPadEditSetTitleHandleKeyboardWillShowNotification:) name:UIKeyboardWillShowNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(iPadEditSetTitleHandleKeyboardWillHideNotification:) name:UIKeyboardWillHideNotification object:nil];
Run Code Online (Sandbox Code Playgroud)
以及处理程序本身的定义:
- (void)iPadEditSetTitleHandleKeyboardWillHideNotification:(NSNotification *)notification
- (void)iPadEditSetTitleHandleKeyboardWillShowNotification:(NSNotification *)notification
- (void)iPadEditSetTitleHandleKeyboardDidShowNotification:(NSNotification *)notification
Run Code Online (Sandbox Code Playgroud)
任何帮助表示赞赏.
更新:
开始一个新的项目,让这里的所有东西都是视图控制器,所有这一切.
//
// DWViewController.m
// KeyboatdTest
//
// Created by Dan Wesnor on 12/3/12.
// Copyright (c) 2012 Dan Wesnor. All rights reserved.
//
#import "DWViewController.h"
@interface DWViewController ()
@end
@implementation DWViewController
- (void)handleKeyboardNotification:(NSNotification *)notification
{
NSLog(@"%@", notification.name);
}
- (void)viewDidLoad
{
[super viewDidLoad];
[[NSNotificationCenter defaultCenter] …Run Code Online (Sandbox Code Playgroud)