以下是否容易编码?
我有一个tableview,当用户选择一个单元格时,会加载一个详细视图.我希望允许用户通过左右滑动在表格视图中表示项目的项目/细节视图中导航,工作方式与例如iphone的主屏幕相同(例如,在滑动时,一页正在移动关闭屏幕,下一个出现).
我已经看到这在MobileRSS-APP中实现了,所以它是可能的,但我只是很难找到正确的方法.
提前一百万!我仍然试图用可可触摸找到我的脚...
我发现很难找到一些关于此的确凿信息.我在Debian 5.0的数据中心有一个专用服务器.我有一个使用JAVA EE(Glassfish 2.1)后端的iPhone/iPad应用程序,我正在将视频应用到应用程序中.这包括直播和视频超过10分钟,我需要HTTP直播.
什么是最好的开源/免费解决方案?这只是一个试点项目,所以我不想订阅任何付费服务.我目前还没有任何实时流媒体,所以我可以灵活地适应任何系统(服务器或客户端).
我碰到:
关于视频,我最好将720p版本上传到服务器(用于iPad),然后自动转换(在请求时或在文件上传时准备好)到iPhone/iTouch所需的格式和低带宽.对于直播,我希望能够在流入服务器的大约30秒内提供内容.
我没有设想高要求(例如,很多同时请求,如果是这样(例如直播事件)在一个流上应该能够使用HTTP实时流处理,它只需要编码和分段一次).
在(不那么近)未来的android也可能成为App的一部分.
任何提示/教程/建议/建议将非常感激.
有人知道是否可以在App for iOS 5中使用故事板,并使用普通的NIB文件用于较旧的iOS版本?
我目前正在重新开发一个应用程序,并且希望将Storyboard包含在新功能中(主要是因为您可以在视图中设计表格,轻松创建不同的原型单元格)."旧"界面将成为iOS 5之前版本的遗产.
但是,当添加故事板,并在iOS 5时以编程方式加载它时,我收到编译器错误"故事板在iOS 4.3和之前不可用".有没有办法让这个工作?
如何调试以下崩溃报告?
用户从App Store安装应用程序,但应用程序在加载时崩溃.我自己无法重新制造崩溃.我在我自己的iPad上查看了我的崩溃报告并找到了类似的报告,但是再次无法重新生成它.问题是用户它阻止了应用程序加载(而崩溃,我发现自己只是崩溃了应用程序,但它重新启动时工作正常).
有没有人可以指点我调试下面的方法?
SysInfoCrashReporterKey
31136b81228e5ddf6387c3aed3543d3580bcca2c
bug_type
109
description
Incident Identifier: F112DB19-91AA-4184-8B66-D2D80E451652
CrashReported Key: 31136b81228e5ddf6387c3aed3543d3580bcca2c
Hardware Model: iPad2,2
Process: iDomsReader [776]
Path: /var/mobile/Applications/0A50B09F-C579-425A-8EB8-95F4C5517929/iDomsReader.app/iDomsReader
Identifier: iDomsReader
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2012-02-04 12:55:59.542 -0700
OS Version: iPhone OS 5.0.1 (9A405)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0xa001af11
Crashed Thread: 10
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x36e49010 0x36e48000 + 4112
1 libsystem_kernel.dylib 0x36e49206 0x36e48000 + …Run Code Online (Sandbox Code Playgroud) 我没有使用C++的经验,只需要对C++应用程序进行一些小调整就可以执行HTTP请求来验证用户身份.
Curlpp是一个选项,但是当包含库时,我在构建时遇到错误:
Undefined symbols for architecture x86_64:
"curlpp::OptionBase::OptionBase(CURLoption)", referenced from:
app_idomsconnector::RTMPAppProtocolHandler::GetAuthPassword(std::string) in libidomsconnector.a(rtmpappprotocolhandler.cpp.o)
curlpp::OptionTrait<std::string, (CURLoption)10002>::clone() const in libidomsconnector.a(rtmpappprotocolhandler.cpp.o)
Run Code Online (Sandbox Code Playgroud)
据我所知,我需要在CMAKELists.txt文件中添加/链接库.谁能告诉我究竟需要添加什么?(运行OSX 10.8)正如我所提到的,我没有使用C++的经验,因为我大多数时候都使用Java.
只是一个愚蠢的问题:我有一个简单的计数器,但似乎它给出了我期望的双重值.
short int *new = 0;
++new;
NSLog(@"Items: %hi", new);
Run Code Online (Sandbox Code Playgroud)
这会返回:
项目:2
相对较新的Cocoa,并且仍在制定细节,如上面的清晰形式......
是否有一种简单/内置的方法让控制器检查连接是否被授权访问静态文件而不是服务器(使用数据库查找),然后在需要时提供访问权限.
有大型视频文件,我想a)检查是否允许用户访问该文件,b)如果用户被授权我想记录视频已被观看.
我试图使用通知系统,以便在Splitviewcontroller中有一个详细视图来更新tableview.我宣布通知如下:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pushView:) name:@"pushView" object:nil];
Run Code Online (Sandbox Code Playgroud)
和选择器本身:
- (void) pushView:(UIViewController *) viewController {
[self.navigationController pushViewController:viewController animated:YES];
}
Run Code Online (Sandbox Code Playgroud)
现在,在详细视图中,我创建了视图控制器并调用创建通知:
ArticleTableViewController *articleTableView = [[ArticleTableViewController alloc] initWithCategory:catInt];
[[NSNotificationCenter defaultCenter] postNotificationName:@"pushView" object:articleTableView];
Run Code Online (Sandbox Code Playgroud)
我认为那会有效,但我收到错误:
*由于未捕获的异常'NSInvalidArgumentException'终止应用程序,原因:' - [NSConcreteNotification setParentViewController:]:无法识别的选择器发送到实例0x5a3a290'
所以我想我在如何在用于推送的通知中包含detailViewController时做错了.
notifications cocoa-touch uiviewcontroller ipad uisplitviewcontroller
我正在尝试调试我最近转换为使用ARC的项目.我很难确定为什么对象没有被释放并留在内存中(是否有一种简单的方法可以查看哪个引用将对象保存在内存中?)
通知中心链接似乎存在一个问题.在viewDidLoad上我注册了三个通知:
[notificationCenter addObserverForName: kAudioPlaybackStart
object: nil
queue:[NSOperationQueue mainQueue]
usingBlock:^(NSNotification *note) {
[self handle_PlaybackStateStart:nil];
}];
[notificationCenter addObserverForName: kAudioPlaybackStop
object: nil
queue:[NSOperationQueue mainQueue]
usingBlock:^(NSNotification *note) {
[self handle_PlaybackStateStop:nil];
}];
[notificationCenter addObserverForName: kAudioPlaybackPause
object: nil
queue:[NSOperationQueue mainQueue]
usingBlock:^(NSNotification *note) {
[self handle_PlaybackStatePause:nil];
}];
Run Code Online (Sandbox Code Playgroud)
然后,当viewController完成后,我调用一个函数unLoad:
- (void) unLoad {
[[NSNotificationCenter defaultCenter] removeObserver:self];
_mediaPlayerHelper = nil;
_article = nil;
_tableView = nil;
}
Run Code Online (Sandbox Code Playgroud)
我有一个单独的函数的原因是除非释放所有对象,否则不会调用viewDidUnload,所以我需要一些东西来释放它们.目前我在viewDidDisappear上调用它们.
但是,在注释掉观察者时,代码工作正常(并且查看卸载),但是观察者看起来它似乎不起作用并且视图保留在内存中.有什么建议?
iphone objective-c nsnotificationcenter ios automatic-ref-counting
这可能是一个非常直接的应用程序,但我是Objective-C(来自Java)的新手,整个内存管理和"EXC_BAD_ACCESS"错误让我心碎.
我有一个普通的NavigationController iPhone App,带有Core Data.在AppDelegate中创建NSManagedObjectContext并将其传递给RootViewController.从主线程直接查找视图以填充表,这似乎工作正常.
该应用程序是某种RSS类型的阅读器,因此只要应用程序启动,我就会触发一个线程来获取新数据并更新视图:
-(void)updateData:(id)sender {
UIActivityIndicatorView *activityIndicator =
[[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(0, 0, 20, 20)];
[activityIndicator startAnimating];
UIBarButtonItem *activityItem =
[[UIBarButtonItem alloc] initWithCustomView:activityIndicator];
[activityIndicator release];
self.navigationItem.leftBarButtonItem = activityItem;
[activityItem release];
// Start thread to update the data
[NSThread detachNewThreadSelector:@selector(doUpdateData) toTarget:self withObject:nil];
}
-(void)doUpdateData{
NSLog(@"Update data Thread (in 5 sec.)");
[NSThread sleepForTimeInterval:5];
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
DataManager *data = [[DataManager alloc] initWithContext:managedObjectContext];
[data updateData];
[data release];
data=nil;
[self performSelectorOnMainThread:@selector(finishUpdateData) withObject:nil waitUntilDone:NO];
[pool release];
}
-(void)finishUpdateData{
self.navigationItem.leftBarButtonItem = …Run Code Online (Sandbox Code Playgroud) 我想使用类覆盖具有CSS定义的表格单元格的背景:
<table class="adminTable">
<thead>
<tr>
<th>Title</th>
<th align="center" width="50">%</th>
<th align="center">Actions</th>
</tr>
</thead>
<tbody>
<tr class="">
<td>Test</td>
<td align="center" class="IN_PROGRESS">27%</td>
<td align="center" width="175">
<a class="rounded-button" href="/admin/workflows/1/summary">Show</a>
<a class="rounded-button" href="/workflows/delete?id=1" class="button">Delete</a>
</td>
</tr>
</tbody>
</table>
Run Code Online (Sandbox Code Playgroud)
"IN_PROGRESS"值随不同的行而变化,并提供指示状态的颜色.
这是我的CSS样式表:
.adminTable {
width: 100%;
border-width: 1px;
border-spacing: 2px;
border-style: outset;
border-color: gray;
border-collapse: separate;
background-color: WhiteSmoke ;
}
.adminTable th {
border-width: 1px;
padding: 5px;
border-style: dotted;
border-color: gray;
background-color: white;
-moz-border-radius: 10px;
}
.adminTable td {
border-width: 1px;
padding: 5px;
border-style: dotted;
border-color: …Run Code Online (Sandbox Code Playgroud) iphone ×4
objective-c ×4
cocoa-touch ×3
ipad ×3
ios ×2
c++ ×1
cmake ×1
cocoa ×1
core-data ×1
css ×1
curl ×1
curlpp ×1
html ×1
html-table ×1
int ×1
java ×1
storyboard ×1
swipe ×1
uitableview ×1
xcode ×1