小编Mic*_*ith的帖子

Xcode:获取警告"从枚举类型UIDeviceOrientation隐式转换"

完全警告:

Implicit conversion from enumeration type 'UIInterfaceOrientation' to different enumeration type 'UIDeviceOrientation'
Run Code Online (Sandbox Code Playgroud)

让它上线:

[self orientationChanged:interfaceOrientation];
Run Code Online (Sandbox Code Playgroud)

这是方法:

- (void)orientationChanged:(UIInterfaceOrientation)interfaceOrientation 
Run Code Online (Sandbox Code Playgroud)

我真的不明白这个警告来自哪里.

xcode objective-c uiinterfaceorientation

24
推荐指数
1
解决办法
2万
查看次数

UITextField似乎没有调用textFieldShouldBeginEditing

我试图禁用UITextField打开键盘,但我遇到了麻烦

.H

#import <UIKit/UIKit.h>
@interface XXViewController : UIViewController <UITextFieldDelegate> {
    IBOutlet UITextField* someTextField;
}

@property (nonatomic, retain) IBOutlet UITextField* someTextField;
@end
Run Code Online (Sandbox Code Playgroud)

.M

@implementation XXViewController

@synthesize someTextField;


-(BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
    NSLog(@"Hello");
    return NO;  
}
...
Run Code Online (Sandbox Code Playgroud)

我确信这是一个非常简单的问题.我一直在寻找年龄,找不到解决方案

谢谢提前

编辑:NSLog没有被调用.

iphone xcode objective-c uitextfield uitextfielddelegate

1
推荐指数
1
解决办法
2312
查看次数

如何在页面的右下角放置一个链接

我目前正在使用以下代码来执行此操作.

<span style="position: absolute; bottom: 0pt; right: 0pt;">
  Load time: 1.1920928955078E-5 seconds</span>
Run Code Online (Sandbox Code Playgroud)

我遇到的问题是,如果页面是可滚动的,那么它就在页面的中间位置.我确信这有一个简单的解决方案,但我无法想出来.

任何帮助或建议将不胜感激.

html css alignment

0
推荐指数
1
解决办法
1万
查看次数