jjzjj

viewcontroller

全部标签

ios - 具有共享数据的应用程序的初始点

这是我的iOS应用程序的结构:/NavigationController->ViewController->...TabBarController-NavigationController->ViewController->...\NavigationController->ViewController->...应用初始点的TabBarController有3个选项卡,然后通过NavigationControllers开始在ViewControllers中导航。我需要在应用程序中有一个位置可以访问嵌入在NavigationController中的每个ViewController。可以说

ios - 如何将另一个 UIViewController 添加到现有的 UINavigationController

我有一个带有两个ViewController的应用程序。第一个嵌入在导航Controller中并有一个导航栏,在第一个ViewController中的某个方法结束后,我以编程方式呈现第二个ViewController。这工作正常,但这样第二个ViewController不是导航Controller堆栈的一部分,并且与第一个ViewController没有任何关系。像这样,我无法利用导航Controller。关于如何解决这个问题的任何想法?在用户从照片库中选取图像后,我向第二个ViewController显示此代码:-(void)imagePickerController:(UIImag

ios - 将数据从 ViewController 传递到实例化的自定义 View Controller

我正在尝试将数据从我的数据库传递到在此函数中实例化的新ViewController中的UILabels。我已经测试过数据是否被正确抓取,并且工作正常。我相信我没有在我的DataViewController中为实例化正确引用UILabel。当我尝试NSLog(dataViewController.cartAddress)时得到空值有什么帮助吗?ViewController.m-(void)mapView:(GMSMapView*)mapViewdidTapInfoWindowOfMarker:(GMSMarker*)marker{NSObject_DatabaseHelper*dataT

IOS 游戏中心 : How to know when default sign in form for game center is finished?

我想知道如何知道用户何时完成GameCenter登录表单。我正在自动登录Facebook,但我需要等待GameCenter登录完成。有什么方法可以知道吗?-(void)authenticateLocalPlayer{GKLocalPlayer*localPlayer=[GKLocalPlayerlocalPlayer];localPlayer.authenticateHandler=^(UIViewController*viewController,NSError*error){[selfsetLastError:error];if(localPlayer.authenticated)

ios - swift : Missing Strange Parameter

我在我的ViewController类中创建了一个名为refresh的方法。我从一个View的ViewController调用refresh,该View在默认View上以模态方式呈现。然而,尽管我的方法refresh不接受任何参数,但XCode在调用该方法期间告诉我Missingargumentforparameter#1incall。我这样调用方法:ViewController.refresh()如果我在方法调用的括号之间按esc,Xcode会告诉我放入ViewController。但是,如果我运行它,Xcode会给我两个错误:Expressionresolvestoanunused

ios - 将数据从 Viewcontroller 传输到 UIview

我正在尝试使用在UIView中绘制图形-(void)drawRect:(CGRect)rect{[superdrawRect:rect];CGContextMoveToPoint(context,0f,0f);CGContextAddLineToPoint(context,Value1,0);CGContextStrokePath(context);}如果我在我的UIView.m中定义Value1它可以工作但是:Value1应该从另一个ViewController传输,我在其中将Value键入文本字段。如何将值1传输到我的UIView中?(我可以将值转移到另一个ViewControll

ios - 将 ViewController 中的所有元素设置为不被 VoiceOver 读取

我正在寻找一种方法来告诉VoiceOver不要读取整个ViewController的元素值(value)。原因是,我有一个按钮,按下时会在屏幕上显示模态VC。我说modal-ish,因为它不是模态而是带有自定义动画的自定义VC,它实际上并没有覆盖整个屏幕,所以新VC和旧VC同时在View中并保持在内存中。当用户用两根手指滑动以阅读屏幕上的所有元素时,VoiceOver将首先阅读我的新VC中的元素,就像它应该的那样,然后它会开始阅读这个VC后面现在“隐藏”的元素(在引号中,因为它们没有以编程方式设置为隐藏,只是隐藏因为VC掩盖了它们)并且不应阅读。有什么简单的方法可以让VoiceOver

ios - 从推送通知 IOS 打开应用程序时打开特定的 ViewController

我需要从推送通知中打开一个特定的ViewController;这是我的mainStoriboard:MyStoryBoard我能够到达ViewController,但是当我到达那里时,我看不到选项卡栏和导航Controller。这里的代码:@implementationAppDelegate-(BOOL)application:(UIApplication*)applicationdidFinishLaunchingWithOptions:(NSDictionary*)launchOptions{if(launchOptions!=nil){UIStoryboard*sb=[UISto

iOS ViewController subview 在键盘出现时移动

我有一个UITableView,它是我的ViewController的一个属性。这个ViewController使用自动布局+Storyboard约束定位在屏幕顶部下方40像素处。我最近添加了一个标签和文本字段,它们最初隐藏在Storyboard中,并被限制在tableview的正后方。我添加了一个方法来显示这些字段:-(void)showNeighborhoodFilter{[UIViewanimateWithDuration:.5动画:^{如果(self.neighborhoodLabel.hidden){self.neighborhoodLabel.hidden=否;self.n

c# - 从另一个 ViewController 接收后的初始化数据

我有两个ViewController类。首先-HarachieRolliController。第二-DetailTovarProsmotr我在XamariniOS(C#)的MainStoryboard文件中创建了它此处截图点击button_arrow_product002后:1)需要打开DetailTovarProsmotr2)需要传数据给DetailTovarProsmotr,并显示在一些字段中,例如(titleproduct001),这是字符串。一级代码:partialclassHarachieRolliController:UIViewController{publicHarac