猪投上海,沙逼北京。反腐风暴,雾霾十省。石化爆炸,大V冰冷。爸爸哪儿?情圣汪峰。鹏菲分手,快乐男声。累感不爱,不约而同。我伙惊呆,曼德拉崩。不要姑父,钓鱼岛晴。恒大夺冠,立军偷情。梦鸽护子,伏法峻峰。私人订制,小时代猛。棱镜窥私,土豪登顶。黄鸭巡游,中国织梦。
千里之行,一直都在!
猪投上海,沙逼北京。反腐风暴,雾霾十省。石化爆炸,大V冰冷。爸爸哪儿?情圣汪峰。鹏菲分手,快乐男声。累感不爱,不约而同。我伙惊呆,曼德拉崩。不要姑父,钓鱼岛晴。恒大夺冠,立军偷情。梦鸽护子,伏法峻峰。私人订制,小时代猛。棱镜窥私,土豪登顶。黄鸭巡游,中国织梦。
First lock the link: http://blog.csdn.net/totogo2010/article/details/7672271
In this section, the author tell us how to use a Bundle ,But when I use the Bundle! I had a problem……
I delete the image or other resource (or changed) in the Xcode,then i run the code,the app would not change!!
eg: I copy a sqlite file from the Xcode to the app, when I change the file in the workspace , the app in the simulator
is not change!!
Finaly: I fixed it by changed the ****.app this bundle in : ……/Users/appxy_dev_056/Library/Developer/Xcode/DerivedData/PeriodPal-brninsdxsnedjoejuhpqlgbklbev/Build/Products
{
[super
viewDidLoad];
NSBundle * mainBundle = [NSBundle
mainBundle];
NSString * imagePath = [mainBundle
pathForResource:@”QQ20130912-1″ ofType:@”png”];
NSLog(@”%@”, imagePath);
UIImage *image = [[UIImage
alloc] initWithContentsOfFile:imagePath];
UIImageView *imageView = [[UIImageView
alloc] initWithImage:image];
[imageView setFrame:CGRectMake(0,
20, 320, 100)];
[self.view
addSubview:imageView];
[image release];
[imageView release];
// Do any additional setup after loading the view.
UIView *contentView = [[UIView
alloc] initWithFrame:[[UIScreen
mainScreen] applicationFrame]];
contentView.backgroundColor = [UIColor
blackColor];
self.view = contentView;
[contentView release];
CGRect labelFrame = CGRectMake(40.0f,
200.0f, 240.0f,
60.0f);
UILabel *frontLabel = [[UILabel
alloc] initWithFrame:labelFrame];
frontLabel.text = @”Hello World!”;
frontLabel.font = [UIFont
fontWithName:@”Georgia”
size:24.0f];
frontLabel.textColor = [UIColor
colorWithRed:0.82f
green:1.0f blue:0.286f
alpha:1.0f];
frontLabel.backgroundColor = [UIColor
colorWithRed:0.0f
green:0.0f blue:0.0f
alpha:0.0f];
[contentView addSubview:frontLabel];
[frontLabel release];
}
use this ,you can know how a bundle work!!
First come to the three gif image!
link form baidu pan
first :main code
{
UIButton * tempBt = sender;
if (tempBt.backgroundColor == [UIColorblackColor]) {
tempBt.backgroundColor = [UIColorredColor];
return;
}else{
tempBt.backgroundColor = [UIColorblackColor];
return;
}
}
second:
{
UIButton *tempBtn = sender;
UIButton *temBt2 ;
NSArray *array = [NSArrayarrayWithObjects:Bt1,Bt2,Bt3,nil];
for (int i =0; i<array.count; i++) {
temBt2 = [array objectAtIndex:i];
temBt2.backgroundColor = [UIColorblackColor];
}
if (Flag1 ==0) {
tempBtn.backgroundColor = [UIColorredColor];
intAddTag++;
tempBtn.tag = intAddTag;
Flag1 = 1;
return;
}
if (Flag1) {
if (intAddTag == tempBtn.tag) {
tempBtn.backgroundColor = [UIColorblackColor];
Flag1 = 0;
}else{
tempBtn.backgroundColor = [UIColorredColor];
intAddTag++;
tempBtn.tag =
intAddTag;
Flag1 = 1;
}
}
}
Third main code:
{
UIButton *tempBtn = sender;
UIButton *temBt2 ;
NSArray *array = [NSArrayarrayWithObjects:Bt1,Bt2,Bt3,nil];
for (int i =0; i<array.count; i++) {
temBt2 = [array objectAtIndex:i];
temBt2.backgroundColor = [UIColorblackColor];
}
tempBtn.backgroundColor = [UIColorredColor];
}
First come to the code:
{
intAddTag = 3000;
intAddTag++;
Flag1 = intAddTag;
NSLog(@”flag1 %d,intAddTag %d=========”,Flag1,intAddTag);
intAddTag = 3000;
Flag1 = intAddTag++;
NSLog(@”flag1 %d,intAddTag %d=========”,Flag1,intAddTag);
}
like up, the test builder is IOS ,Xcode 5.0
print :
2013-09-11 16:28:59.530 PeriodPal[5010:a0b] flag1 3001,intAddTag 3001=========
2013-09-11 16:28:59.530 PeriodPal[5010:a0b] flag1 3000,intAddTag 3001=========
so the value is different!!!!
前段时间问了下sim的工程师,才发现使用usb烧机的具体设置方法,分享下:
首先需要看对应 项目.mak里是不是将usbdownloade打开了(09A我的是USB_DOWNLOAD = NONE,10A USB_DOWNLOAD_IN_BL = NONE 就是没有打开,其他变量可以自己看下把,熟悉代码的人都知道)
这个很关键,因为我之前一直不知道是怎么改的,只改了后面的步骤,怎么都是没有验证成功,后来搜了下发现是宏没有打开的原因。
其次就是修改文件了吧,研究启动代码,就找到更改按键的地方。bl_main.c(10A是这里,09A就是另外的了,但原理相似)里有USBDL_Ready_To_Enter_DLMode,usbdlkey_position这个变量,变量就是配置默认usb下载按键的!
有两处定义它的地方:
1.custom_blconfig.c(由sysGen2.pl生值过来的)
2.sysGen2.pl
修改下按键值就可以
const kal_uint8 usbdlkey_position = DEVICE_KEY_VOL_UP;//DEVICE_KEY_STAR
10A的下面还有一个变量
kal_uint16 usbdlauto_timeout = 5000;
修改为一个延时的值比如5000,它就自动下载了。。
很方便!!
多么美好的阳光!
在这个静静的下午,我极其悠闲的写着博客,想想这段时间来做开发的很多的事,想着想着就不能不提诺基亚的Symbian了!
记得上次我参加了一个中国移动与诺基亚ovi的开发者交流会,会议内容大致就是各个平台的代表上台吹嘘他们所在的平台有多么的优秀,以后又会在市场上又有多么多么广阔的前景,我笑而不语。在最后一排。
记得Symbian是这样说的,他们以后就要更加广泛的进入到Qt的开发,随着Windows Phone7的到来,诺基亚也将会和微软进行亲密的合作。
我勒个去,呵呵,诺基亚就差和Android合作了,前段时间和intel合作推出的megoo操作系统现在还是不了了之,而Android的版本却已经到了2.3了。
坦白的说,从我用诺基亚的s60第一版的开始到现在我就一直有关注着诺基亚,但是一开始以为诺基亚是一个成产性的大型集团,能够有这么大的出货量应该有着很紧密的结构,换句话说,诺基亚有些像微软,当时我是这么认为的。
但是那次我参会时一个偶然的机会发现诺基亚的全名是一个中国诺基亚什么什么投资公司。
我晕了。
公司名称都是有讲究的,一旦成为了一个什么投资公司的话,这个公司的性质就变了!
换句话说IT型的公司,一旦成就大了之后的话,其原始的研究能力就有所下降了,相比而言。
诺基亚就是这样,我做硬件,那么我就可以去找软件系统好的公司,把他们的系统拿来改吧改吧就成了我的独有的了,对于他们的东西,我就是知道有就可以了。
也许这就是诺基亚没落的原因。
曾经我是那么信心满满的学习Symbian,结果学完了,Symbian日落西山了。
总有种说不出的落寞,但不仅仅是对于我。
想想感触真的很多。
VC编模拟09a的版本时,出现了che.lib无效链接类型的错误,经查发现是公司有修改MTK che.lib相关的文件导致che.lib文件错误,替换到相应的正确的che.lib即可,车是不是一个很少见的姓?哈哈
引:一般情况下,出现链接时候的错误都是由于库文件的版本不正确所引起的,无论是编译器自身的库文件还是一些公司所开发的打包了的库文件!