Tag Archives: png

now or never

1)

有些事,当你经历过挫折后,才想起人家曾经已告诫过.

有些事,明知道如何去做对,却终究延续现有的道路.

Read more »

Tutorial of kissXML(iPhone)

KissXML is a good approach for parsing xml data, and the x-path function make it more powerful.

Integrate With You Project And KissXML

  • Download source codes form here
  • Add all the files to your project (excluding DDXMLTesting)
  • Configure you project to work with libxml

click Project -> Edit Project Settings

You’ll be adding this to your compiler instructions

OTHER_LDFLAGS = -lxml2

HEADER_SEARCH_PATHS = /usr/include/libxml2

Using KissXML

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!

Things I’ve done int past 5 months

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:

NameLinesFiles
Third part header236034
Third part Source491638
Project Header7222170
Project Source28330173
Total42828415
Total Pngs431

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)

小试Unity游戏引擎

大四第一学期曾在学校的数字媒体实验室工作了很短时间,第一次看到现场手绘,maya做动画,zbrush绘制高模,倍感荣幸。

其中还有部分人在把弄一个游戏引擎(忘记叫什么名字了),可以让机器人在里面蹦蹦跳跳的走路。

那一刻让我想起第一次玩准3D游戏「生化危机II」的场景,震撼,鸡东的整个人在颤抖。

随着年龄的增长,对游戏的感觉也从狂热渐渐变成消磨时间,甚至忘记了小时候的梦想。

第一次游戏行业距离我这么近,却因为心有余而力不足放弃了。

回到标题上,自从 Unity 推出了免费版后,蠢蠢欲动,今天终于下载把玩了下。

一打开默认有个island的项目,场景做的很细腻,令我惊讶的是点击运行无需等待即可在场景中测试,很棒。

一遍看教程一遍开始了第一个测试项目。专业词汇挺多,没法像看程式书那样一下子就消化一堆。

最后还是不费力的做好了第一个场景,放了个对象在自己的小岛上跑了一圈,incredible! 简直想象不到眼前的居然是我做的。hohoho

暂时对Unity的感觉是,很简单,很高效,而且做出来的效果比我想象中好很多,顺便说说它使用的脚本语言 Unity JavaScript ,但是我怎么看也和我的老朋友 ActionScript3 更相似些 ,好处是可以少浪费时间看新语法书了。

附xhan’s 终极防御要塞。

bird-view

这里是更多图片

Read more »

将编译好的iPhone程序的PNG还原

iPhone程序包中的png文件是经过处理,不能直接查看。

如果一定要看!!!好了,这个工具能满足你的好奇心。

Name: iPhonePNG
Usage:  ./iPhonePNG <input>   input 可以是单个png文件也可以是文件夹
download:  iPhonePNGdecoding

以下链接能了解更多这个格式的细节:

Wiki for this png format
The author’s post for this tools

用 Redmine 管理iPhone项目中过多的图片文件

XCode 项目管理估计是人见人恨,如果是一堆人一起做一个项目。真会被项目文件整疯的。

而如果项目中有大量图片(数百张级别),并且频繁更新。那你完了。

之前的流程是这样的:美工更新了图片到服务器共享文件夹,然后程序部再取下来更新项目中对应的图片或添加。步骤繁琐,而且更新不及时,非常影响程序部的效率。

然后计划给美工找个 osx 下简单好用的svn管理工具,找了多款也不满意。最后就诞生了这个简单的基于redmine的小插件。

Redmine Image SVN plugin

Redmine Image SVN plugin

Read more »

iPhone 组件模板(设计用)分享

还在设计iPhone程式时在草稿纸上涂鸦吗?你out了,使用这款iPhone组件模板并配合OmniGraffle这款软件,只需简单几步就可以设计出原生的iPhone程式界面了。

预览图

预览图

Read more »

[Flash]转盘抽奖系统客户端

展示界面

展示界面

全站外貌

全站外貌

版权关系只提供 Flash 端代码。

写这个东西设计上出了点漏洞,回顾代码整个项目只有一frame 。所以浪费了很多代码控制各个组件 visible 属性。

还有在如何控制指针缓慢停下到最后位置的设计也有点赶巧,一开始为了节约设计时间直接凑了几个数字做时间关键字。结果效果不理想,调整了很久才勉强看起来自然点。如果一开始就用物理方法计算估计效率会高很多。

附源码,有debug模式,单机也可以玩玩~

开发环境: Flex3(代码) + Flash10(界面)

项目时间:2009年3月20日

开发时间:一周(服务端和客户端) Read more »