标签: three20

TTViewController和popupViewController方法

我正在使用TTLauncherView,为此,我将视图控制器声明为TTViewController,就像在TTCatalog教程应用程序中一样.在该视图中声明TTLauncherView var,添加项目等.

在我的应用程序的主视图中是一个按钮,使用以下代码调用上一个视图:

-(void) switchToButtonOrderingView
{
    ButtonOrderingViewController *ButtonOrderingView=
    [[ButtonOrderingViewController alloc] initWithNibName:@"ButtonOrderingViewController" bundle:nil]; 
    self.ButtonOrderingViewController = ButtonOrderingView; 
    [self.view insertSubview:ButtonOrderingView.view atIndex:10];
}
Run Code Online (Sandbox Code Playgroud)

当我按下按钮时,应用程序会在这个属于TTViewController.m的方法中刹车:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
  UIViewController* popup = [self popupViewController]; //brakes up here
  if (popup) {
    return [popup shouldAutorotateToInterfaceOrientation:interfaceOrientation];
  } else {
    return [super shouldAutorotateToInterfaceOrientation:interfaceOrientation];
  }
}
Run Code Online (Sandbox Code Playgroud)

而错误就是这样:

[ButtonOrderingViewController popupViewController]:无法识别的选择器发送到实例

选中查看Three20 Class Hierarchy和TTViewController是一个UIViewController子类.

popupViewController是一个TTPopViewController(及其子类)方法!我没有使用TTCatalog教程应用程序.我迷路了.任何帮助将不胜感激.

谢谢.

iphone uiviewcontroller three20

5
推荐指数
1
解决办法
2194
查看次数

弹出ttthumbsviewcontroller后,视图控制器正在我的导航栏下绘图

我正在从Three20项目实现TTThumbsViewController,事情终于开始成形.我将TTThumbsViewController从当前视图控制器推出,只需将其推入当前堆栈并设置转换动画(通用导航控制器推送).

我的问题是,当我弹出TThumbsViewController视图控制器时,导航控制器卡在一个模式下,其视图控制器在导航栏(现在是半透明的)下绘制.

开始

替代文字

替代文字

流行的

替代文字

iphone uinavigationcontroller three20

5
推荐指数
1
解决办法
2982
查看次数

使用自定义TTPhotoView扩展TTPhotoViewController

我已经在我的项目中成功集成了three20框架,并且我已经扩展了TTPhotoViewController以添加一些其他功能.

现在我需要为TTPhotoViewController加载的TTPhotoView添加一些子视图.特别是我想在每个TTPhotoView加载后添加子视图.这些子视图表示图像上的合理区域,因此它们应与图像成比例缩放.用户可以点击子视图以获取有关图像的额外信息.

我不知道如何实现这种行为.我应该扩展TTPhotoView并确保TTPhotoViewController使用此扩展版本而不是其TTPhotoView吗?

有人能指出我正确的方向吗?谢谢

iphone three20 ttphotoviewcontroller

5
推荐指数
1
解决办法
2500
查看次数

有没有TTPickerTextField替代品?也许在iOS4?

在iOS4中是否存在类似的替代或新内容 TTPickerTextField

我正在寻找一种方法来重新创建"新邮件"控件视图,我已经读过了TTPickerTextField.Three20是我的最后一个选项(特别是因为它没有iPad版本),我想知道iOS4是否提供了一些新的UI控件来执行此操作.

iphone cocoa-touch three20 ios4

5
推荐指数
1
解决办法
1231
查看次数

RestKit与Three20集成

我正在尝试使用Restkit来调用我的Web服务器api,但是事情不起作用.我的控制器只显示活动指示器,没有任何反应.

我有一个api电话,假设要返回前50个视频,例如:http: //example.com/services/getTop50Video

返回的格式为:

<results>
<mysql_host>72.9.41.97</mysql_host>
<results>        
    <title/>
    <views/>
    <video_id>j2xFxHgENt4</video_id>
    <thumbnail>http://img.youtube.com/vi/j2xFxHgENt4/2.jpg</thumbnail>
    <url/>
</results>
...
</results>
Run Code Online (Sandbox Code Playgroud)

我的应用代表代码:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

    // Configure RestKit Object Manager
    RKObjectManager* objectManager = [RKObjectManager objectManagerWithBaseURL:@"http://example.com/services"];

    RKObjectMapper* mapper =  objectManager.mapper;
    [mapper registerClass:[YouTubeVideo class] forElementNamed:@"video"];

     // Other non relevant stuff
}
Run Code Online (Sandbox Code Playgroud)

TWYouTubeVideo类:

@implementation TWYouTubeVideo

@synthesize title = _title;
@synthesize numberOfViews = _numberOfViews;
@synthesize videoID = _videoID;
@synthesize thumbnailURL = _thumbnailURL;


+ (NSDictionary*)elementToPropertyMappings {
    return [NSDictionary dictionaryWithKeysAndObjects:
            @"title", @"title",
            @"views", @"numberOfViews",
            @"video_id", …
Run Code Online (Sandbox Code Playgroud)

iphone rest objective-c three20 restkit

5
推荐指数
1
解决办法
1363
查看次数

将TTTableViewController(从three20)添加到另一个UIViewController

我遇到了问题three20,我希望有人可以帮助我.

我有一个TTTableViewController类似于示例项目中的TTTwitter应用程序three20使用它的方式.我刚才三种方法我执行:(id)init,(void)createModel,和(id<UITableViewDelegate>)createDelegate.我已经子类TTListDataSourceTTURLRequestModel我的数据.总而言之,这是一个相当简单的用法TTTableViewController,我没有做任何与众不同的事情.

当我将它添加TTTableViewController到后代时UIView,它可以正常工作.它可以完美地加载和显示数据.例如,以下两个工作正常:

FooTableViewController *controller = [[FooTableViewController alloc] init];
controller.view.frame = CGRectMake(288, 20, 480, 1004);
[self.window addSubview:controller.view];
Run Code Online (Sandbox Code Playgroud)

就像这样:

FooTableViewController *controller = [[FooTableViewController alloc] init];
controller.view.frame = CGRectMake(288, 20, 480, 1004);

UIScrollView *scrollView = [[UIScrollView alloc] init];
scrollView.frame = CGRectMake(0, 0, 768, 1024);
// a bunch of scrollView variable initializations..
[scrollView addSubview:controller.view];
[self.window addSubview:scrollView];
Run Code Online (Sandbox Code Playgroud)

当我尝试添加FooTableViewController(再次,是它的子类 …

iphone uiviewcontroller three20

5
推荐指数
1
解决办法
1872
查看次数

三个竞争对手/替代品

我看到three20是一个非常强大的lib,因为Facebook和Twitter使用它.我只是想知道Three20是否有任何竞争对手/替代品?甚至简单.

three20 ios

5
推荐指数
1
解决办法
4544
查看次数

奇怪的是three20的TTTableViewController框架属性

我正在添加一个TTTableViewController现有的UIViewController,我发现的一个奇怪的事情是frame初始化的TTTableViewController 的属性是有线的,例如在iOS布局中.

我有:

  1. UIStatusBar
  2. UINavigationController
  3. UIViewController
  4. UITabBar

为了设置TTTableViewController所有剩余空间的填充,我需要将高度设置为460而不是367.(367 = 480-20-44-49)

例如

self.tableViewController.view.frame = CGRectMake(0, 0, 320, 460.0f);
Run Code Online (Sandbox Code Playgroud)

代替

self.tableViewController.view.frame = CGRectMake(0, 0, 320, 367.0f);
Run Code Online (Sandbox Code Playgroud)

为什么会这样?

*编辑澄清:我的意思是TTViewController顶部的TTTableViewController(使用[self.view addSubview:self.tableViewController.view];),我需要设置self.tableViewController.view.frame = CGRectMake(0,0, 320,460.0f); 而不是367

iphone xcode objective-c three20 ios

5
推荐指数
1
解决办法
268
查看次数

TabBar支持Three20 iPhone照片库

我通过教程并为iPhone创建了一个照片库.现在我想将它添加到我的TabBar项目中.我已经听说过,Three20不支持XIB,所以我将整个标签栏设置改为以编程方式.我想我离最终的解决方案并不太远.

我能够让照片库在一个标签中工作,但没有功能(点击图片 - >打开,等等).页面顶部没有导航,可以引导您进入详细图像页面.当我从app delegate中的didFinishLaunchingWithOptions-method中删除它时,我遇到了这个问题:

// Override point for customization after application launch
TTNavigator* navigator = [TTNavigator navigator];
TTURLMap* map = navigator.URLMap;
[map from:@"demo://album" toViewController:  [AlbumController class]];

[navigator openURLAction:[TTURLAction actionWithURLPath:@"demo://album"]];
return YES;
Run Code Online (Sandbox Code Playgroud)

我不得不将其删除,否则整个标签栏都不会显示.照片库使用整个屏幕.我不确定它是否未显示或未加载.我也尝试过:

tabbar.hidesBottomBarWhenPushed = NO;
Run Code Online (Sandbox Code Playgroud)

但那根本不起作用.我试图在没有结果的情况下将TTNavigator代码添加到AlbumController本身的loadView(),viewDidLoad()和init().有谁知道我必须把它放在哪里,以使其工作?

我的AlbumController.h:

#import <Foundation/Foundation.h>
#import <Three20/Three20.h>

@interface AlbumController : TTThumbsViewController {
    // images
    NSMutableArray *images;

    // parser
    NSXMLParser * rssParser;
    NSMutableArray * stories;
    NSMutableDictionary * item;
    NSString * currentElement;
    NSMutableString * currentImage;
    NSMutableString * currentCaption;
}

@property (nonatomic, retain) NSMutableArray *images;

@end …
Run Code Online (Sandbox Code Playgroud)

iphone tabbar photo-gallery three20

4
推荐指数
1
解决办法
3829
查看次数

照片浏览器(带缩放,平移,缩放等)?Three20的替代品

我有一个带有几张照片的应用程序.如果用户点击其中一个,我希望他能够缩放,平移,缩放等等.我不需要像Three20这样的东西.首先,我正在从应用程序内部的文件加载图像,其次我不需要"库"功能(显示网格中的所有图像>像Photos.app).所以我只需要左图中的部分......

在此输入图像描述

我怎样才能做到这一点?有没有"样本课"或教程?

非常感谢提前!

iphone uiviewcontroller uiimageview three20 ios

4
推荐指数
1
解决办法
3734
查看次数