我正在开发一个网站,我需要一个在线C/C++编译器来在线测试代码.
有没有可行和可行的解决方案.
我需要这个编译器,以便学生可以在线测试他们的代码.
Thnx in avance
任何人都可以建议我一些SDK或为iPhone创建本地QR码生成器的方法?请赐教我这个我已经提到了zxing和其他几个qr代码库,但没有一个支持iphone用于qr代码生成
提前致谢
我有一个情况,我必须处理touchesBegan文本字段.此文本字段位于scrollview中.
到目前为止我试过这个:
我创建了UIScrollView的子类
@interface CustomScrollView : UIScrollView
{
}
@end
@implementation CustomScrollView
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
NSLog(@"good");
}
@end
Run Code Online (Sandbox Code Playgroud)
在这里,我可以得到理想的结果.
我用textfields实现了同样的东西.我做了一个子类UITextField:
@interface CustomTextField : UITextField
{
}
@end
@implementation CustomTextField
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
NSLog(@"good");
}
@end
Run Code Online (Sandbox Code Playgroud)
如果文本字段在普通视图中,这可以正常工作,但是当文本字段位于常规scrollView或我的自定义scrollview中时,它会失败.
请赐教我这个
(我这样做是为了在用户长按文本字段时获得类似的内容,文本字段中的文本从Textfield分配到标签,用户可以将此标签拖到视图中的其他位置)
我有一个情况,
当我点击搜索栏键盘时,我在同一屏幕上有一些搜索栏.现在,如果我们点击scree上的任何其他位置,这个键盘可能会消失.
请帮我解决一下这个.
Thanx提前.
挣扎了一段时间,如果你能阐明这一点,那将会非常有帮助:
我有一个APIWorkerProtocol有属性要求的属性,所需的属性是一个协议,即DataParserProtocol
protocol APIWorkerProtocol {
var apiRequestProvider : APIRequestGeneratorProtocol {get}
var dataParser : DataParserProtocol{get}
func callAPI(completionHandler: @escaping (APICallResult<Self.ResultType>) -> Void)
}
protocol DataParserProtocol {
associatedtype ExpectedRawDataType
associatedtype ResultType
func parseFetchedData(fetchedData : ExpectedRawDataType) -> APICallResult<ResultType>
}
Run Code Online (Sandbox Code Playgroud)
我怎样才能实现这个目标?
在当前的实现中,这会导致错误Protocol 'DataParserProtocol' can only be used as a generic constraint because it has Self or associated type requirements。
提前致谢
安基特
触摸发生时你能捕捉到TextField事件吗?到目前为止,我没有看到Touch事件被注册到TextField.例如,
* (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [event allTouches] anyObject;
if (touch view == TextFieldView) {
do somthing.....
}
Run Code Online (Sandbox Code Playgroud)
这个我想要实现的虚拟代码是我想要一个当用户触摸文本字段一段时间时被触发的方法.如果是的话怎么样???
对此有所启发.
Thnx提前.
我想实现这个
1)当用户开始在文本字段中键入时,popOver会闪烁,并根据在textfield中输入的字符串显示弹出窗口中表格视图中的项目列表.
2)此外,每次输入的新字母都应刷新此数据.
一种预测性搜索.
请帮助我,并提出可行的方法来实现这一点.
我需要这方面的帮助.我有3个视图控制器,表示Parent和Child1,Child2
在父viewcontollers我有一个名为容器和分段控件的视图.
现在,每当分段控件的值发生变化时,我希望这个"容器"视图的内容随动画而变化.
我已经做到这里,请告诉我需要添加什么:
if (selectSearchType.selectedSegmentIndex==0) {
[aAdvanceSearchViewContoller.view removeFromSuperview];
[container addSubview:aBasicSearchViewController.view];
}else {
NSLog(@"Advance Search");
[aBasicSearchViewController.view removeFromSuperview];
[container addSubview:aAdvanceSearchViewContoller.view];
}
Run Code Online (Sandbox Code Playgroud) 我有两个uiviews 1个孩子和1个父父视图在点击按钮时有alpha .30我想将子视图的alpha更改为1.0或0.0这是可能的,如果是,那么如何.
请赐教我这个.
提前Thanx :)
iphone ×6
ipad ×4
objective-c ×2
uitextfield ×2
c++ ×1
generics ×1
ios ×1
ios4 ×1
php ×1
protocols ×1
qr-code ×1
swift ×1
uisearchbar ×1
uiview ×1
xcode ×1