简体   繁体   English

iOS-将UIMonthYearPicker与Interface Builder一起使用

[英]iOS - Using UIMonthYearPicker with Interface Builder

I need to use third party library called UIMonthYearPicker in my project. 我需要在项目中使用名为UIMonthYearPicker的第三方库。

I use the above library in my MKNewpary view controller. 我在MKNewpary视图控制器中使用上述库。 I implemented the UIPickerView in the The .xib of the MKNewparty view controller. 我在MKNewparty视图控制器的.xib中实现了UIPickerView。

My MKNewpary.h 我的MKNewpary.h

@property(retain,nonautomic)IBOUTLET UImonthYearPicker*picker;

How do I make sure this picker uses the UIMonthYearPicker class? 如何确保此选择器使用UIMonthYearPicker类?

界面生成器

As per the instructions on the GitHub project page, you need to change the class of your UIPickerView to UIMonthYearPicker . 按照GitHub项目页面上的说明您需要将UIPickerView的类更改为UIMonthYearPicker Change the class in Interface Builder by navigating to the Utilities view -> Identity Inspector, and changing Class under Custom Class to UIMonthYearPicker . 通过导航到“实用工具”视图-> Identity Inspector,然后将“自定义类”下的“类”更改为UIMonthYearPicker来更改Interface Builder中的类。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM