cocoa-touch

Why is self.navigationController NULL when pushed from UITabBarController subviews

不羁的心 提交于 2021-02-08 11:51:28
问题 This is what I am doing. I have a tabBarControllerOne with 5 tabs. On clicking one of the tabs, I present a modal view controller, which has a navigationBar and a TabBarControllerTwo (with 3 tabs). These three tabs are the matter for concern here. In the 5th Tab of tabBarController I show modalViewController as UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:self.nextTabView]; // navController.navigationBarHidden = YES; navController

Custom class not shown in the storyboard identity inspector

守給你的承諾、 提交于 2021-02-07 14:32:31
问题 I created in my app a new class named EmpresasTableViewController , and in the storyboard I copied CategoriasViewController to EmpresasTableViewController, I just want to assign the class EmpresasTableViewController to EmpresasTableViewController in the storyboard, but the name EmpresasViewController doesn't appear in the Identity Inspector . There are no errors after creating the class, but why is it not shown as a class in the storyboard Identity Inspector under Custom Class ?, all other

Custom class not shown in the storyboard identity inspector

不打扰是莪最后的温柔 提交于 2021-02-07 14:31:00
问题 I created in my app a new class named EmpresasTableViewController , and in the storyboard I copied CategoriasViewController to EmpresasTableViewController, I just want to assign the class EmpresasTableViewController to EmpresasTableViewController in the storyboard, but the name EmpresasViewController doesn't appear in the Identity Inspector . There are no errors after creating the class, but why is it not shown as a class in the storyboard Identity Inspector under Custom Class ?, all other

Custom class not shown in the storyboard identity inspector

情到浓时终转凉″ 提交于 2021-02-07 14:30:33
问题 I created in my app a new class named EmpresasTableViewController , and in the storyboard I copied CategoriasViewController to EmpresasTableViewController, I just want to assign the class EmpresasTableViewController to EmpresasTableViewController in the storyboard, but the name EmpresasViewController doesn't appear in the Identity Inspector . There are no errors after creating the class, but why is it not shown as a class in the storyboard Identity Inspector under Custom Class ?, all other

UIAlertAction completion block not called - iOS

只愿长相守 提交于 2021-02-07 11:36:31
问题 I have an iOS app with a UIAlertController in the form of a action sheet being presented in my app when the user taps on a button. It all works great, apart from one thing, the completion blocks don't get called for some reason. Here is my code: // Setup the alert information/type. UIAlertController *action_view = [UIAlertController alertControllerWithTitle:@"Test title" message:@"test message" preferredStyle:UIAlertControllerStyleActionSheet]; // Create and add the cancel button.

iOS Get Link Speed (Router Speed Test)

喜欢而已 提交于 2021-02-07 08:24:02
问题 I want to test speed of connected router(wifi modem) from iOS app. I've found something here Get link speed programmatically? but could not found sockios.h and ethtool.h Is it possible to port this code to Objective-C or is there another way? -- Sorry for the missing info and my poor english. I want to test link speed (tx rate) between ios device and connected wifi modem. There was a property named txRate in CWInterface class. I want to get that data in Cocoa Touch. /*! * @property *

iOS Get Link Speed (Router Speed Test)

偶尔善良 提交于 2021-02-07 08:21:31
问题 I want to test speed of connected router(wifi modem) from iOS app. I've found something here Get link speed programmatically? but could not found sockios.h and ethtool.h Is it possible to port this code to Objective-C or is there another way? -- Sorry for the missing info and my poor english. I want to test link speed (tx rate) between ios device and connected wifi modem. There was a property named txRate in CWInterface class. I want to get that data in Cocoa Touch. /*! * @property *

Reading a file from a hard drive in iPhone simulator

北慕城南 提交于 2021-02-07 06:46:46
问题 Is it possible to read a file (from my normal file system) into a iPhone App running on the iPhone Simulator? I understand that the iPhone itself has not got a (user accessible) file system but this is simply for testing and will only ever be run in the simulator. The file will be a text file that can be edited while the application is running, it will be read every-time a method is called. 回答1: Yes, you can, and it doesn't matter where it is. Just give it an absolute path name when you load

Shadow on UIView layer

家住魔仙堡 提交于 2021-02-07 06:34:29
问题 I've make a path in order to mask my view: let path = // create magic path (uiview bounds + 2 arcs) let mask = CAShapeLayer() mask.path = path.cgPath view.layer.masksToBounds = false view.layer.mask = mask Up to here all ok. Now I would like to add a shadow that follows path, is it possibile? I try in several way, the last one is: mask.shadowPath = path.cgPath mask.shadowColor = UIColor.red.cgColor mask.shadowOffset = CGSize(width: 10, height: 2.0) mask.shadowOpacity = 0.5 But this produce a

Shadow on UIView layer

我的梦境 提交于 2021-02-07 06:34:04
问题 I've make a path in order to mask my view: let path = // create magic path (uiview bounds + 2 arcs) let mask = CAShapeLayer() mask.path = path.cgPath view.layer.masksToBounds = false view.layer.mask = mask Up to here all ok. Now I would like to add a shadow that follows path, is it possibile? I try in several way, the last one is: mask.shadowPath = path.cgPath mask.shadowColor = UIColor.red.cgColor mask.shadowOffset = CGSize(width: 10, height: 2.0) mask.shadowOpacity = 0.5 But this produce a