Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone TTImageView与身份验证_Iphone_Three20 - Fatal编程技术网

Iphone TTImageView与身份验证

Iphone TTImageView与身份验证,iphone,three20,Iphone,Three20,我知道如何使用TTImageView,但现在我的项目中有了这个要求,我们需要显示来自受用户名密码保护的服务器的图像。我不知道如何在TTImageView上设置用户名密码。这是我的密码- TTImageView *ttItemImage = [[TTImageView alloc] initWithFrame:CGRectMake(x, y, 40, 40)]; ttItemImage.urlPath = imageURL; [ttItemImage setBackground

我知道如何使用TTImageView,但现在我的项目中有了这个要求,我们需要显示来自受用户名密码保护的服务器的图像。我不知道如何在TTImageView上设置用户名密码。这是我的密码-

        TTImageView *ttItemImage = [[TTImageView alloc] initWithFrame:CGRectMake(x, y, 40, 40)];
 ttItemImage.urlPath = imageURL;
 [ttItemImage setBackgroundColor:[UIColor clearColor]];
 ttItemImage.style=  [TTShapeStyle styleWithShape:[TTRectangleShape
               shape] next:[TTContentStyle styleWithNext:nil]]; 
 ttItemImage.userInteractionEnabled = NO;
 ttItemImage.contentMode = UIViewContentModeScaleAspectFit;

知道这是否可行以及如何实现吗?

如果是我这样做,我只需创建TTImageView的子类,并通过对服务器的自定义调用覆盖重载方法。通过这种方式,您可以添加用户名和密码以及您希望使用的任何其他标题/方法。

如果是我这样做,我只需创建TTImageView的子类,并通过对服务器的自定义调用覆盖重载方法。这样,您就可以添加用户名和密码以及您希望使用的任何其他标题/方法