Tag: UI控制器

dyld:无法加载插入的库

当我尝试运行UI和unit testing时,我得到了exception: dyld:无法加载插入库'/private/var/containers/Bundle/Application//AutoTestingApp.app/Frameworks/IDEBundleInjection.framework/IDEBundleInjection',因为找不到合适的图片。 find了: dyld:没有加载的库:@ rpath / XCTest.framework / XCTest 我已经尝试了 重新安装xCode 检查开发人员和configuration文件 应用程序构build成功,但未经testing。 我怎么了?

旋转时更改子视图框架

我在我的基本视图控制器中添加子视图(backgroundView)在我的基本视图控制器中它的工作很好,但是当我从potraite更改方向从景观它的框架大小是相同的potrait我想在旋转时更改子视图的大小。 UIView *activityView = [[UIView alloc] initWithFrame:self.view.bounds]; CGRect frame = activityView.frame; activityView.frame = frame; activityView.backgroundColor = [UIColor clearColor]; activityView.alpha = 0.0f; [self.view addSubview:activityView]; self.activityView = activityView; UIView *backgroundView = [[UIView alloc]initWithFrame:activityView.bounds]; backgroundView.alpha = 0.0f; [backgroundView setBackgroundColor:[UIColor lightGrayColor]]; [self.activityView backgroundView]; UIActivityIndicatorView *spinning = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; [self.activityView spinning]; spinning.center = activityView.center; self.activityView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin […]

在不同的uiview中的iOS MultiTouch事件

UIViewcontroller上有两个不同的UIView。 该UIView是留下UIView(leftScreenView)和右UIView(rightScreenView)。 他们区分子视图leftJoystickView(在leftScreenView)和rightJoystickView(在rightScreenView)。 但是我发现下面的问题: 当我触摸leftScreenView并移动时,现在我触摸右边的ScreenView上的其他手指。 现在触摸事件总是在leftScreenView上。 这不能区分leftScreenView和rightScreenView事件。 我需要触摸左边的ScreenView,并且移动和触摸右边的ScreenView移动是不同的事件(做移动)在同一时间。 如何处理多点触摸区分不同的移动事件并开始事件? #pragma mark —– touch action —– -(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { // NSLog(@"——touchesBegan——-"); UITouch *touch = [[event allTouches] anyObject]; CGPoint touchViewPoint = [touch locationInView:touch.view]; CGPoint touchLeftScreenPoint = [touch.view convertPoint:touchViewPoint toView:self.leftScreenView]; CGPoint touchRightScreenPoint = [touch.view convertPoint:touchViewPoint toView:self.rightScreenView]; NSLog(@"touch left:%d",[self.leftScreenView pointInside:touchLeftScreenPoint withEvent:event]); NSLog(@"touch right:%d",[self.rightScreenView pointInside:touchRightScreenPoint withEvent:event]); NSLog(@"touch.tapCount:%ld", […]

iOS UI自动化。 执行logElementTree时,不会显示所有元素

我有以下UI元素的层次结构: -UIATableView —- UIATableCell ——– UIAStaticText ——– UIAButton UIATableCell的第三个元素应该是dynamic出现在屏幕上的“加载指示器”,但它不在那里。 在执行logElementTree之前,我使用了.delay() 。 我相信代码中的所有内容都是正确的。 其他人遇到这个问题? 它有解决scheme吗?

如何访问UIATablecell中的图像

我试图validation一个图像显示/隐藏使用UIAutomation iOS7上。 我.cells()[0].images()的问题是.cells()[0].images()总是返回[object UIAElementNil]即使我可以看到我的图像。 我也尝试在主窗口调用images() ,但也没有运气。 任何帮助赞赏。 谢谢。

葫芦iOS:如何使用查询命令获取价值

我试图通过查询命令来获取每个类的值。 下面是我得到的示例UI组件: [0] { "class" => "UITabBarSwappableImageView", "id" => "imageView-34", "rect" => { "center_x" => 288, "y" => 522, "width" => 48, "x" => 264, "center_y" => 538, "height" => 32 }, "frame" => { "y" => 2, "width" => 48, "x" => 6, "height" => 32 }, "label" => nil, "description" => "<UITabBarSwappableImageVie….>" 在Android上,我可以使用它来列出类组件的所有值: […]

iOS:无法在UITableViewController上创build自定义视图

我在做什么? 我通过构build一个应用程序来学习iOS 。 我的需求在UITableViewController上显示了一些事务 我需要添加header ,我需要devise一些具体的信息和风格。 我问iOS:我如何为表格自定义标题部分? 并意识到我需要做一个自定义的UIView 。 问题是我不能在UITableViewController上拖动View ,XCode不允许我 问题? – 如果你看到这个不仅显示UIView而且显示整个iPhone屏幕 – 我需要显示在我的UITableViewController ,现在我有什么,我怎么能把UIView作为我的UITableViewController头?

如何将一个NSMutableArray传递给另一个ViewController类

我在“HeroListViewController”中创build了NSMutale数组。 我想在另一个是MapTutorialViewController的viewController中使用它。 我试过这样 在HeroListViewController.h中 MapTutorialViewController *maptutorialcontroller; NSMutableArray *listData; 设置属性并正确合成它们 在HeroListViewController.m中 – (void)viewDidLoad { [super viewDidLoad]; listData = [[NSMutableArray alloc] init]; } – (UITableViewCell *)tableView:(UITableView *)theTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *HeroTableViewCell = @"HeroTableViewCell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:HeroTableViewCell]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:HeroTableViewCell] autorelease]; } NSManagedObject *oneHero = [self.fetchedResultsController […]

在UIPageViewController中禁用反弹效果

我已经实现了一个包含两个页面的UIPageViewController 。 在最右侧的页面上,我可以向右滑动,并将页面拉回,这样当我释放时,它就会弹回来。 当我向左滑动时,左侧页面也会发生同样的情况。 (弹跳就像当你到达Safari浏览器页面底部时发生的事情) 有没有办法来禁用反弹效果? 谢谢!