ChatGPT_聊天机器人
1、在线网页
-
1.1 国内
-
1.2 国外
2、问题模版
-
2.1 问方法
我给定一个给方法写注释的格式,
/**
* @brief Hud展示信息,默认悬停时间2秒
*
* @param message 展示信息
*/
- (void)show_Info:(NSString *)message;
帮我给 UIViewController 以下的方法添加中文注释,格式按照我给定的格式来写
// This should be called whenever the view controller's preferred pointer lock value has changed.
- (void)setNeedsUpdateOfPrefersPointerLocked API_AVAILABLE(ios(14.0)) API_UNAVAILABLE(watchos, tvos);
-
2.2 问属性
我给定一个给属性写注释的格式,
/** 控制控件是否启用 */
@property(nonatomic, getter=isEnabled) BOOL enabled;
帮我给 UIViewController 以下的属性添加中文注释,格式按照我给定的格式来写
@property (nonatomic, readonly, nullable) UIViewController *childViewControllerForPointerLock API_AVAILABLE(ios(14.0)) API_UNAVAILABLE(watchos, tvos);
@property (nonatomic, readonly) BOOL prefersPointerLocked API_AVAILABLE(ios(14.0)) API_UNAVAILABLE(watchos, tvos);
-
2.3 清除多余注释
帮我移除以下代码中的注释,移除支持的API系统版本号
- (void)scrollViewDidScroll:(UIScrollView *)scrollView; // any offset changes
- (void)scrollViewDidZoom:(UIScrollView *)scrollView API_AVAILABLE(ios(3.2)); // any zoom scale changes
// called on start of dragging (may require some time and or distance to move)
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView;
-
2.4 给枚举添加注释
我给定一个给枚举写注释的格式,
"
// 描述用户界面中的不同按钮样式。
typedef NS_ENUM(NSUInteger, NSBezelStyle) {
// 表示一个圆角矩形形状的按钮,边角比NSBezelStyleRoundedDisclosure更圆滑。
NSBezelStyleRounded = 1,
// 表示一个标准的正方形形状的按钮。
NSBezelStyleRegularSquare = 2,
// 表示一个标准的圆角矩形形状的按钮,中间有一个小三角形,用于指示按钮的状态或行为。
NSBezelStyleDisclosure = 5,
};
"
帮我给以下枚举添加中文注释,格式按照我给定的格式来写
"
typedef NS_ENUM(NSInteger, UIDatePickerStyle) {
/// Automatically pick the best style available for the current platform & mode.
UIDatePickerStyleAutomatic,
/// Use the wheels (UIPickerView) style. Editing occurs inline.
UIDatePickerStyleWheels,
/// Use a compact style for the date picker. Editing occurs in an overlay.
UIDatePickerStyleCompact,
/// Use a style for the date picker that allows editing in place.
UIDatePickerStyleInline API_AVAILABLE(ios(14.0)) API_UNAVAILABLE(tvos, watchos),
} API_AVAILABLE(ios(13.4)) API_UNAVAILABLE(tvos, watchos);
"
我有一串这样的OC代码字符串:
if ([absoluteString hasSuffix:@"afdfdb."mui"] || [absoluteString isEqualToString:@"muic.".zip"] || [absoluteString hasSuffix:@"muiabczi"] || [@"zh-Hans-US\n" isEqualToString:application]) {
我想把字符串中的 @"afdfdb."mui"、@"muic.".zip"、@"muiabczi" 给提取出来,用OC该怎么操作
以上的回答很准确,我现在再增加一个场景,您再帮我处理一下
if ([absoluteString hasSuffix:@"afdfdb."mui"] || [absoluteString isEqualToString:@"muic.".zip"] || [absoluteString hasSuffix:@"muiabczi"] || [@"zh-Hans-US\n" isEqualToString:application]) {
我想把字符串中的 @"afdfdb."mui"、@"muic.".zip"、@"muiabczi"、@"zh-Hans-US\n" 给提取出来,用OC该怎么操作