我正在将我的iPhone应用程序升级到高分辨率图形,我遇到了旧设备的一些问题.这种情况涉及我的UITabBar图标.看一看:

顶部截图看起来正确.它是在运行OS4的最新一代iPhone(新屏幕)上捕获的.但是,第二个截图是完全错误的.高分辨率图标以100%大小显示并且正在被裁剪.第二张截图是从运行OS4的第二代iPod touch(旧屏幕)中截取的.
所以,我真的很困惑.我已经阅读了Apple的文档,据我所知,我正在做他们需要的一切.在我的应用程序包中,我的图像命名为:
在界面构建器中,我已指定要在选项卡栏中使用的每个图像的低分辨率版本(文件名为WITHOUT"@ 2x").如果我正确理解iPhone文档,设备应自动检测屏幕分辨率并显示高分辨率版本(如果可用).所以,如果有的话,我的iPod touch几乎看不到它的显示分辨率.我在这里错过了一些东西吗?
任何可以提供的帮助或见解将不胜感激!谢谢.
更新1:
到目前为止没有运气.我采用手动方法并将以下内容添加到viewDidLoad我的命令中UITabBarController:
- (void)viewDidLoad {
[super viewDidLoad];
UITabBarItem *tab;
UIViewController *item;
tab = [[UITabBarItem alloc] initWithTitle:@"Featured" image:[UIImage imageNamed:@"tab-featured.png"] tag:0];
item = [self.viewControllers objectAtIndex:0];
item.tabBarItem = tab;
[tab release];
tab = [[UITabBarItem alloc] initWithTitle:@"Topics" image:[UIImage imageNamed:@"tab-topics.png"] tag:1];
item = [self.viewControllers objectAtIndex:1];
item.tabBarItem = tab;
[tab release];
tab = [[UITabBarItem alloc] initWithTitle:@"Video" image:[UIImage imageNamed:@"tab-video.png"] tag:2];
item = [self.viewControllers objectAtIndex:2];
item.tabBarItem = tab;
[tab release];
tab …Run Code Online (Sandbox Code Playgroud) 我似乎无法在#each模板循环中生成一个按钮,将其单击操作绑定到其关联的模型.这是问题的快速演示......
该Ember.js应用程序的设置:
window.Contacts = Ember.Application.create();
Contacts.Person = Ember.Object.extend({
first: '',
last: '',
save: function() {
// send updated information to server.
}
});
Contacts.contactsList = Ember.ArrayController.create({
content:[],
init: function() {
this.pushObject( Contacts.Person.create({
first:'Tom',
last:'Riddle'
}));
}
});
Run Code Online (Sandbox Code Playgroud)
模板:
<script type="text/x-handlebars">
{{#each Contacts.contactsList}}
<li>
{{view Ember.TextField valueBinding="first" viewName="firstname"}}
{{view Ember.TextField valueBinding="last" viewName="lastname"}}
<button {{action "save" on="click"}}>Save</button>
</li>
{{/each}}
</script>
Run Code Online (Sandbox Code Playgroud)
问题:
因此,在这个简单的演示场景中的想法是每个记录的"保存"按钮将触发一个动作来保存自己模型的状态.但是,单击"保存"按钮会出错:
Uncaught TypeError: Cannot call method 'call' of undefined
Run Code Online (Sandbox Code Playgroud)
我的假设是将"save"指定为按钮的动作会将其绑定到save其模型上的方法.但是,情况似乎并非如此.其他一些对象似乎正在处理单击操作,其中"保存"处理程序未定义.我在这里错过了什么吗?如何让每个订单项的按钮在自己的模型上调用处理程序?
在此先感谢您的帮助!
这让我很疯狂......虽然我有一个Express + Socket.io的工作版本,我似乎无法通过在新项目文件夹中开箱即用的NPM安装来重现它.任何人都可以指出我错过了什么......?这是我的过程:
我node_modules在项目目录(pwd)中创建了一个文件夹,然后执行:
npm install express
npm install socket.io
Run Code Online (Sandbox Code Playgroud)
运行这两个命令会将包node_modules按预期放入项目的文件夹中.现在我使用以下内容设置我的服务器:
var express = require('express'),
server = express.createServer().use( express.static(__dirname+'./public') ).listen( 8080 ),
io = require('socket.io').listen(server);
Run Code Online (Sandbox Code Playgroud)
我的public文件夹包含我的应用程序的静态资产 我的公共索引HTML页面包含一个脚本标记:
<script src="/socket.io/socket.io.js"></script>
Run Code Online (Sandbox Code Playgroud)
最后,我运行我的服务器脚本并在Web浏览器中转到应用程序.我的静态公共文件都正常提供,但我得到了404 /socket.io/socket.io.js.现在,我可以express从另一个旧项目交换一个包,让整个系统工作.不知何故,包实例配置不同,但我无法弄清楚如何重现它.Express网站提到了有关安装依赖项的内容,虽然运行npm install -d似乎没有帮助(运行时是否pwd需要特定的npm install -d?).我想在使用NPM安装后,我必须遗漏一些关于配置新Express实例的重要信息.
感谢您的所有见解!
我想知道是否有人可以在这里提供见解:
I work for an independent multimedia firm who builds communications material for their clients. We're currently working through our first iPhone app. So, my shop has now completed an app that conforms to our client's brand, and we wish to deploy this app to the App Store on behalf of our client. Looking over Apple's documentation, everything seems to be written on the assumption that you are releasing your own app... therefore, the Apple documentation seems to start one …
情况:我正在将一个系统"项目操作"按钮的实例放入右侧导航按钮插槽中......没有任何问题.但是,我希望该按钮只显示一个没有边框的图标(即:"普通"样式).阅读文档,听起来这应该只是将UIBarButtonItem的"style"属性设置为UIBarButtonItemStylePlain,如下所示:
UIBarButtonItem *shareButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(didPressShare)];
shareButton.style = UIBarButtonItemStylePlain;
self.navigationItem.rightBarButtonItem = shareButton;
[shareButton release];
Run Code Online (Sandbox Code Playgroud)
但是,当我实现上面的代码时,按钮出现在导航栏中,周围有一个边框......显然系统没有观察到我的UIBarButtonItemStylePlain设置.任何想法为什么?制作按钮的任何其他解决方案只显示图标而周围没有边框?
提前致谢!
iphone ×3
javascript ×2
app-store ×1
ember.js ×1
express ×1
node.js ×1
objective-c ×1
socket.io ×1
xcode ×1