草庐IT

interface-design

全部标签

ios - Objective-C 中的变量声明——接口(interface)与实现

这个问题在这里已经有了答案:WheretoputiVarsin"modern"Objective-C?(5个答案)关闭9年前。这两者有什么区别:@interfaceMyClass(){BOOLnewUser;}或者@implementationMyClass{BOOLnewUser;}@end

ios - Photoshop 字体像素大小到 Xcode Interface builder 字体点大小

如何将我的设计师在PhotoShop中给我的字体像素大小与XcodeInterfacebuilder中的正确字体大小相匹配。例如,我的设计师在他的设计中使用HelveticaNeueuRegular32px字体。我在像素翻译站点上使用了一些点,但似乎并不准确。我试图按照这个问题的答案,但无济于事:https://stackoverflow.com/a/6107836/1014164 最佳答案 在视觉上比较Photoshopcomp与真实程序时,您永远不会得到完美的结果。事实上,不同计算机之间文本布局不同的情况并不少见,因为版本和操作

ios - 在 iOS Designer 中创建的代码中的访问约束

在InterfaceBuilder(Xcode)中,可以直观地创建一个约束,然后添加一个导出以访问代码中的约束,如example.在iOSDesigner(XamarinStudio)中是否有类似的东西? 最佳答案 比想象的要简单。选择要更改的约束。双击约束,您可以直接在PropertiesPad中进行约束设置。为约束输入一个名称,现在您可以在代码中使用该约束。 关于ios-在iOSDesigner中创建的代码中的访问约束,我们在StackOverflow上找到一个类似的问题:

iphone - 如何使用带有 Interface Builder 的 UINavigationController 创建 UIViewController?

在我的iOS应用程序中,我想提供一个设置View。“presentModalViewController”工作得很好:ViewSettings*controller=[[ViewSettingsalloc]initWithNibName:@"ViewSettings"bundle:nil];UINavigationController*navController=[[UINavigationControlleralloc]initWithRootViewController:controller];[self.navigationControllerpresentModalViewCo

objective-c - 在实现文件中声明接口(interface)(Objective-C)

在xCode(4.3)的最后一个版本中,我看到了在.m文件中进行接口(interface)声明的预定义模板(例如我们的Master/Detail模板)。例如,在文件MyFile.h中有:@interfaceMyFile@property(nonatomic,retain)NSString*someProp;@end在MyFile.m文件中有:@implementationMyFile@interfaceMyFile{NSString*anotherProp;}-(id)init...为什么要这样制作?为什么anotherProp没有声明到MyFile.h文件中?提前致谢

iphone - 'NSObject<PageControlDelegate>' 没有可见的@interface 声明选择器 'pageControlPageDidChange:'

我从thispost得到了这段代码一切正常,除了一件事,我有这个错误,我不知道如何修复。这是代码:-(void)touchesBegan:(NSSet*)toucheswithEvent:(UIEvent*)event{CGPointtouchPoint=[[[eventtouchesForView:self]anyObject]locationInView:self];CGRectcurrentBounds=self.bounds;CGFloatx=touchPoint.x-CGRectGetMidX(currentBounds);if(x=0){self.currentPage--

ios - HttpClient setReachabilityStatusChangedBlock 声明没有接口(interface)

尝试使用AFNetworkingsReachabilityStatusChanged但获取“HTTPCLIENT的可见@interface声明了选择器setReachabilityStatusChangeBlock”但是HttpClient有那个功能。有人知道为什么会这样吗?AFHTTPClient*client=[[AFHTTPClientalloc]initWithBaseURL:[NSURLURLWithString:@"http://stat-api.herokuapp.com/"]];[clientsetReachabilityStatusChangeBlock:^(AFNe

ios - 如何在 iOS 中使用 AFNetworking 从 REST 接口(interface)定期轮询/拉取

我正在我的iPhone上构建一个“监控”应用程序。我正在使用AFNetworking-2.0。我有一个后端服务器公开一个用Python3/tornado编写的RESTful接口(interface)。根据我所处的ViewController级别,我想用不同的查询轮询不同的数据(应用程序的焦点调整查询的焦点)。为了“让它工作”,我设置了以下内容:#pragmamark-PullLoop-(void)forkPull{NSString*uri=[NSStringstringWithFormat:@"%@/valves",Site.current.serialID];[[HttpConnec

ios - Designables : Failed to render and update auto layout status. 我正在使用 Xcode 9.3

我正在使用Xcode9并使用Cocoa框架抛出此错误。我已经尝试了所有可能的方法,但无法解决它。 最佳答案 因此,如果label是pod中的一个库,则您可能受到了cocoapods错误的影响;尝试在您的podfile中添加此post_installpost_installdo|installer|installer.pods_project.build_configurations.eachdo|config|config.build_settings.delete('CODE_SIGNING_ALLOWED')config.bui

TypeScript的三种声明文件、@types、.d.ts、declare、interface、type(超详细)

1、语句示例declarevar声明全局变量declarefunction声明全局方法declareclass声明全局类declareenum声明全局枚举类型declarenamespace声明(含有子属性的)全局对象interface和type声明全局类型export导出变量exportnamespace导出(含有子属性的)对象exportdefaultES6默认导出export=commonjs导出模块exportasnamespaceUMD库声明全局变量declareglobal扩展全局变量declaremodule扩展模块///三斜线指令2、声明语句示例假如我们想使用第三方库jQuer