1)
有些事,当你经历过挫折后,才想起人家曾经已告诫过.
有些事,明知道如何去做对,却终究延续现有的道路.

KissXML is a good approach for parsing xml data, and the x-path function make it more powerful.
click Project -> Edit Project Settings
You’ll be adding this to your compiler instructions
OTHER_LDFLAGS = -lxml2
HEADER_SEARCH_PATHS = /usr/include/libxml2

Here is a quick demo to indicate you how it works.
For example, we need to get the SRC value of each media field from the target xml file.
<smil xmlns="http://www.w3.org/2000/SMIL20/CR/Language"> <head> </head> <body> <par dur="120000ms" > <text region="Text" src="att000.txt" /> </par> <par dur="120000ms" > <text region="Text" src="att010.txt" /> </par> <par dur="10000ms" > <img region="Image" src="att020.jpg"/> </par> <par dur="120000ms" > <text region="Text" src="att040.txt" /> </par> <par dur="10000ms" > <img region="Image" src="att120.gif"/> </par> </body> </smil>
Here are the codes !
//hack to remove xmlns => avoid xpath search not works
xmlStr = [xmlStr stringByReplacingOccurrencesOfString:@"xmlns" withString:@"noNSxml"];
NSMutableArray* contents = [NSMutableArray array];
NSError* error = nil;
DDXMLDocument* xmlDoc = [[DDXMLDocument alloc] initWithXMLString:xmlStr options:0 error:&error];
if (error) {
NSLog(@"%@",[error localizedDescription]);
return nil;
}
NSArray* resultNodes = nil;
resultNodes = [xmlDoc nodesForXPath:@"//audio | //text | //image | //img" error:&error];
if (error) {
NSLog(@"%@",[error localizedDescription]);
return nil;
}
for(DDXMLElement* resultElement in resultNodes)
{
NSString* name = [resultElement name];
//audio , text or other media type
NSString* fileName = [[resultElement attributeForName:@"src"] stringValue];
// 0.txt
}
Note, I replaced the “xmlns” inside the xml file, because it weird xpath would failed if namespace available at a XML file(it might a bug)
And at last, have fun!
It’s awfully to say that Time is running out fast , but it really does.
I’ve been working as a iPhone application developer for five months ,devoting all my energy to my job . Thanks to company’s trust , now I am the core architect and team leader of our small group .
We’ve redesigned most of default iPhone UI components which is really a difficult job at first . After a several days of hardworking ,We released first custom components named ‘MeeTabBarController’ , which is more powerful , flexible, and has ability to manage animations for each tabBar ,each container view’s opening animations and closing animations. It really works great and appears amazing.
Since now We’ve achieved the custom NavigationController, which has more delegate methods , a incredible user interface and animations. the custom alertView , the custom tableViewController , the custom spring board , the custom http-client for fetching remote data , etc .
It would be no exaggeration to say that our custom framework is just another lite version of Three20 .^^
Here is a Preview version of Our Project:
| Name | Lines | Files |
| Third part header | 2360 | 34 |
| Third part Source | 4916 | 38 |
| Project Header | 7222 | 170 |
| Project Source | 28330 | 173 |
| Total | 42828 | 415 |
| Total Pngs | 431 |
Here is a snap shoot of our another application which had submitted to apple store and ready for sale .
It just a simple application that in order to test whether our designs and functions will be rejected or permitted by apple ,Thankfully ,after a mistake that was rejected by undocument api ,It’s status came out to be ready for sale finally.


You can search it by type its name “Grading” ,it’s also based on our custom framework and I cost 3 days to finish it.
Give a try and feel free to comment it !(Note : we put off the sale date of this application for the moment by some conditions)
大四第一学期曾在学校的数字媒体实验室工作了很短时间,第一次看到现场手绘,maya做动画,zbrush绘制高模,倍感荣幸。
其中还有部分人在把弄一个游戏引擎(忘记叫什么名字了),可以让机器人在里面蹦蹦跳跳的走路。
那一刻让我想起第一次玩准3D游戏「生化危机II」的场景,震撼,鸡东的整个人在颤抖。
随着年龄的增长,对游戏的感觉也从狂热渐渐变成消磨时间,甚至忘记了小时候的梦想。
第一次游戏行业距离我这么近,却因为心有余而力不足放弃了。
回到标题上,自从 Unity 推出了免费版后,蠢蠢欲动,今天终于下载把玩了下。
一打开默认有个island的项目,场景做的很细腻,令我惊讶的是点击运行无需等待即可在场景中测试,很棒。
一遍看教程一遍开始了第一个测试项目。专业词汇挺多,没法像看程式书那样一下子就消化一堆。
最后还是不费力的做好了第一个场景,放了个对象在自己的小岛上跑了一圈,incredible! 简直想象不到眼前的居然是我做的。hohoho
暂时对Unity的感觉是,很简单,很高效,而且做出来的效果比我想象中好很多,顺便说说它使用的脚本语言 Unity JavaScript ,但是我怎么看也和我的老朋友 ActionScript3 更相似些 ,好处是可以少浪费时间看新语法书了。
附xhan’s 终极防御要塞。
这里是更多图片
iPhone程序包中的png文件是经过处理,不能直接查看。
如果一定要看!!!好了,这个工具能满足你的好奇心。
Name: iPhonePNG
Usage: ./iPhonePNG <input> input 可以是单个png文件也可以是文件夹
download: iPhonePNGdecoding
以下链接能了解更多这个格式的细节:
版权关系只提供 Flash 端代码。
写这个东西设计上出了点漏洞,回顾代码整个项目只有一frame 。所以浪费了很多代码控制各个组件 visible 属性。
还有在如何控制指针缓慢停下到最后位置的设计也有点赶巧,一开始为了节约设计时间直接凑了几个数字做时间关键字。结果效果不理想,调整了很久才勉强看起来自然点。如果一开始就用物理方法计算估计效率会高很多。
附源码,有debug模式,单机也可以玩玩~
开发环境: Flex3(代码) + Flash10(界面)
项目时间:2009年3月20日
开发时间:一周(服务端和客户端) Read more »