ios怎么运行代码,怎么在iphone上编程

1,怎么在iphone上编程要想学iPhone编程,就要精通C语言,iPhone编程使用的Objective-C语言和C很类似,你一定要打下C的坚实基础暂时还没有这些编程工具 。任何一个硬件的变成平台指的都是对其进行编程平台而不是运行在其上面的编译工具 。所谓iphone的编程平台是用来编译iphone app而不是在iphone上面进行编程工作的,它还没有那么强大 。
2,如何在iOS系统上运行Chrome里的Javascript邮件里的文件——是附件?1. 附件一般需要先下载,然后才能打开 。2. 能不能打开还却决于是否有对应的软件(比如.docx类文件,得装有word才能打开)3. 你点open的时候可能已经下载了,在浏览器的“下载内容”中找找 。4. 点击没有反应可能是某些代码兼容性问题 , 可以换个浏览器试试 。5. 手机版的chrome是有JavaScript 开关的 。一般默认开启,这个应该不需要调整 。你碰到的问题可能是:“弹出式窗口和重定向” 。这个项默认是“禁止”状态——不会出现弹窗 。如果很不幸邮件文件的打开方式是新弹窗打开,那么自然就被屏蔽了,结果就是你说的点了没反应 。进入浏览器的设置,找到“网站设置”——>“弹出式窗口和重定向”——>"允许" 。然后再试试 。再不行就用电脑吧,不必纠结于这个问题 。chrome的javascript 引擎与其它浏览不一样,有些网站就是javascript不兼容 。遇到这样的情况只能用ie8了,或者是ie7 。现在ie6, ie9都不太好用了 。
3,java程序如何运行于iOSmac系统只要安装了java环境就可以用 。iOS系统不行 。每个平台用自己的工具开发,例如Android用ADK , iOS用自己的那一套Mac OS和Windows PC用Qt或者Java不要搞所有平台都用同一套代码 。下载jdk,解压放到一个目录,按下面说的配置环境变量(右击我的电脑-属性-高级-环境变量)新建一系统变量 , 变量名为 java_home ,变量值为jdk所在路径,如d:\programsfolder\java\jdk1.6 , 在path系统变量中加入值 %java_home%\bin;  , 其中 %java_home% 完全可以用上面的实际路径代替 , 注意分号,新建或打开classpath变量,填入值 .;%java_home%\lib\dt.jar;%java_home%\lib\tools.jar,注意最前面有个“.;” 。运行,输入cmd回车打开命令提示行,输入java,出来一系列j关于ava的信息,就表示jdk安装成功 。下载eclipse(是个ide),解压运行就可以,它会自动寻找java虚拟机,用eclipse编写编译就ok,不过初学建议先在命令提示行下编译,明白原理后再用ide , 命令提示行下如何编译可以参考java的相关教材,很简单 。不行的 。java——》安卓C++——》iosjs——》unity——》安卓,ios【ios怎么运行代码,怎么在iphone上编程】
4,怎么使 iOS 在页面滚动的时候运行 js不光是css3,gif动画也是,不信你打开一个gif 滚动的时候看它还动不动 。iOS最先响应屏幕反应 。响应顺序依次为Touch——Media——Service——Core架构,当用户只要触摸接触了屏幕之后,系统就会最优先去处理屏幕显示也就是Touch这个层级,然后才是媒体(Media) , 服务(Service)以及Core架构 。所以说,当系统接收到Touch事件之后会优先响应,此时会暂停屏幕上包括js、css的渲染 。这个时候不光是css动画不动了,哪怕页面没有加载完如果你手指头还停留在屏幕上那么页面也不会继续加载,直到你的手松开 。解决办法有两个,各有瑕疵:不要使用 scroll 事件(此事件会被暂停),而是采用 touchmove(此事件会在用户触屏滚动的时候不断触发) 。瑕疵是,在结束触屏后惯性滚动的时间里,touchmove 无法被触发了(scroll 当然也不行);基于上一种方法,在所有的 touchmove 事件中,强行 preventDefault 阻止掉事件 , 然后根据 event.pageY 来手工设置所滑动元素的 scrollTop 值 。当然,这样一来就没有了惯性滚动 。你也可以在 touchend 之后,手工模拟惯性滚动,计算速度以及速度衰减 , 可以参考各种各样的滚动插件 。这样设置个全局变量 var a =0,然后scroll后 , if(a==0) 执行代码,然后a++.不就执行一次5,在iOS平台中怎样使用c和objective一般开发中需要用到库这个概念,也就是用苹果公司已经写好的代码来构建自己的软件 。但是这个库使用objective-c写的,所以很大程度上就局限了使用的语言 。1.c语言,纯粹用c写的其实不多的,因为现在开发一般都是面向对象,而c++/objective-c支持面向对象,所以在整体上而言用c++/oc比较好,至于为什么要使用面向对象呢 , 构建方便,复用等好多原因的 。当然一些核心上的东西还得c写 , 为什么呢 , 效率 , 譬如编码的转换等 。2.c++其实c++是非常好的,但是由于库的原因,写ui等不方便,用的不多了就,当然啦,譬如cocos2d-x是用c++写的 , 所以由它构建的软件也基本上就是它了 。3.objective-c由于uikit ,cfframework...cocos2d for iphone 等等框架都是该语言写的,所以默认就是该语言了 。最后,语言本身也并无什么好比较的,只是工具而已,希望能帮到你 。objective-c 的源文件扩展名 .mobjective-c++ 的源文件扩展名 .mm 支持c++和objective-c 的混编;EasyNDKC++#include "NDKHelper.h"// The button click method of Cocos2dxvoid HelloWorld::menuCloseCallback(CCObject* pSender)// Register a selector in a global space// So that when our native environment will call the method with the string// It can respond to the selector// Note : Group name is there for ease of removing the selectorsNDKHelper::AddSelector("HelloWorldSelectors","SampleSelector",callfuncND_selector(HelloWorld::SampleSelector),this);// Making parameters for message to be passed to native language// For the ease of use, i am sending the method to be called name from C++CCDictionary* prms = CCDictionary::create();prms->setObject(CCString::create("SampleSelector"), "to_be_called");// Finally call the native method in current environmentSendMessageWithParams(string("SampleSelector"), prms);}// A selector that will respond to us, when native language will call itvoid HelloWorld::SampleSelector(CCNode *sender, void *data)CCLog("Called from native environment");}// Destructor to remove all the selectors which are grouped as HelloWorldSelectors 31HelloWorld::~HelloWorld()// Remove the associated selector group from the global space,// Because we are destroying this instanceNDKHelper::RemoveSelectorsInGroup("HelloWorldSelectors");}Objective-C// Using a UIViewController init method to attach a receiver for messages from C++- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) // Custom initialization// Tell NDKHelper that RootViewController will respond to messages// Coming from C++[IOSNDKHelper SetNDKReciever:self];}return self;}// Implement the selector to be called for a message from C++ 14// Be sure to name the selector to be of the same string as you will pass from C++// Like we passed "SampleSelector" from C++, that is why created this selector- (void) SampleSelector:(NSObject *)prmsNSLog(@"purchase something called");NSDictionary *parameters = (NSDictionary*)prms;NSLog(@"Passed params are : %@", parameters);// Fetching the name of the method to be called from Native to C++ 23 // For a ease of use, i have passed the name of method from C++NSString* CPPFunctionToBeCalled = (NSString*)[parameters objectForKey:@"to_be_called"];// Show a bogus pop up hereUIAlertView *message = [[UIAlertView alloc] initWithTitle:@"Hello World!"message:@"This is a sample popup on iOS"delegate:nilcancelButtonTitle:@"OK"otherButtonTitles:nil];[message show];// Send C++ a message with paramerts// C++ will recieve this message, only if the selector list will have a method// with the string we are passing[IOSNDKHelper SendMessage:CPPFunctionToBeCalled WithParameters:nil];

    推荐阅读