小编awl*_*lcs的帖子

在iphone上没有音量滑块的情况下更改音量

我需要你的帮助.我该如何继续更改应用中的音量.我不想使用音量滑块.相反,我有一个UIImageView,它是一个音量旋钮,我顺时针旋转增加,逆时针旋转减小音量.旋转只是一个动画,我已经完成了那部分.

我需要你的帮助和建议,如何增加/减少音量.谢谢

iphone avfoundation ipad

12
推荐指数
2
解决办法
1万
查看次数

停止当前图像的动画

我有一个动画的图像,直到你按下"停止"按钮.代码工作正常,但图像返回到数组中的第一个图像.如何添加代码告诉它停止当前的图像?

- (void)viewDidLoad {

    [super viewDidLoad];

    imageView.animationImages = [NSArray arrayWithObjects:
                             [UIImage imageNamed:@"a0001.png"],
                             [UIImage imageNamed:@"a0002.png"],
                             [UIImage imageNamed:@"a0003.png"],
                             [UIImage imageNamed:@"a0004.png"],
                             [UIImage imageNamed:@"a0005.png"], nil];

    imageView.animationDuration = 3.00;
    imageView.animationRepeatCount = 0;
    [imageView startAnimating];
    [self.view addSubview:imageView];   
}

- (IBAction)stopAni {       
    [imageView stopAnimating];      
}
Run Code Online (Sandbox Code Playgroud)

谢谢


谢谢院长,嘿,我再次需要你:p现在我已经能够在我想要的地方停下来了,我可以让它继续停止它的动画吗?

iphone animation core-animation

6
推荐指数
1
解决办法
2545
查看次数

我们如何以编程方式获取UIImageView的坐标?

我想以编程方式获取UIImageView的坐标.我该怎么做呢?

例如,我有一个正方形.我想得到所有角落的坐标.我该怎么办?

NSLog("%f", ImageView.frame.origin.x);
NSLog("%f", ImageView.frame.origin.y);
Run Code Online (Sandbox Code Playgroud)

我得到了广场的topleft坐标.

我必须说方形(imageview)旋转,这就是为什么我必须得到它的坐标.

iphone animation uiimageview ipad

6
推荐指数
1
解决办法
7737
查看次数

单个视图上的2个tableview

我需要一个示例或解释如何填充在同一视图上的2个表视图.我需要了解"cellForRowAtIndexPath"方法,有人可以给我一个关于代码应该如何的例子吗?

我的意思是如何识别哪个表视图?

谢谢

下面是我的cellForRowAtIndexPath方法:

 // Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

static NSString *CellIdentifier = @"Cell";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
    }

// Configure the cell...
// Set up the cell
MyAppAppDelegate *appDelegate = (MyAppAppDelegate *)[[UIApplication sharedApplication] delegate];
    if (tableView == radios_tv) { //radio_tv is an IBOutleet UITableView
        sqlClass *aRadio = (sqlClass *)[appDelegate.array_radios objectAtIndex:indexPath.row];
        [cell setText:aRadio.r_name];
        return cell;
    }
    if …
Run Code Online (Sandbox Code Playgroud)

cocoa-touch objective-c uitableview ios

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

弹出窗口的最大大小

有人能确认一下popoverview的最大尺寸吗?

谢谢

iphone ipad uipopovercontroller

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

使用UI按钮关闭popover

我无法弄清楚为什么它不起作用当我试图通过点击一个UIButton来解雇一个popover时,它本身就是一个被解雇的popover,我的项目崩溃......

- (IBAction) cancelButton: (id) sender{
//[self dismissPopoverAnimated:YES];
}
Run Code Online (Sandbox Code Playgroud)

以上是我的UIButton的代码

iphone ipad

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

2 UIAlertView一个接一个

我有一个2 UIAlert显示我按下按钮.我希望第二个警报仅在我们按下第一个OK按钮时第一个UIAlert被解除时才可见.

我该怎么办?以下是我的代码:

- (IBAction)button:(id)sender {
 UIAlertView *view;
 view = [[UIAlertView alloc]
   initWithTitle: @"Message"
   message: @"Adding..."
   delegate: self
   cancelButtonTitle: @"OK" otherButtonTitles: nil];
 [view show];

 MyAppAppDelegate *appDelegate = (MyAppAppDelegate *)[[UIApplication sharedApplication] delegate];

 if (appDelegate.array_presets.count) {
  view = [[UIAlertView alloc]
    initWithTitle: @"Message"
    message: @"limit already reached"
    delegate: self
    cancelButtonTitle: @"OK" otherButtonTitles: nil];
  [view show];
 }

 [view autorelease];
}
Run Code Online (Sandbox Code Playgroud)

iphone uialertview ipad

3
推荐指数
1
解决办法
2310
查看次数

3
推荐指数
1
解决办法
1130
查看次数

从另一个视图更改标签

我的主视图上有一个标签.我有一个按钮,可以将我带到另一个视图.在它上面我有一个按钮来更改主视图上的标签.

我怎样才能做到这一点?我加了一个项目,请有人帮帮我...

项目:这里

iphone

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

将平移手势识别器附加到图像上

有人可以指导我需要做什么吗?我需要将平移手势识别器附加到图像上,这些图像在我们移动时顺时针和逆时针旋转.

谢谢

iphone

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