我正在尝试构建我的应用程序.我运行它(直到最近工作正常),现在它将无法工作,它在控制台中没有给我任何错误.我有什么想法可以找到这个问题吗?
编辑:发生的事情是我的产品名称以数字开头,它自动填充我的包作为com.domain.-mwg而不是数字,它有一个连字符.所以,我进入了info.plist,并在bundle标识符上将其更改为com.domain.5mwg之后它就搞砸了.我试着把钳子换回去,但它仍然混乱.
我需要一个围绕UIImage的边界.UIImage被添加到PDF文件中.这是当前绘制图像的代码.
- (void) drawImage2
{
UIImage * demoImage = self.imageCopy;
NSData *jpegData = UIImageJPEGRepresentation(demoImage, 0.80);
CGDataProviderRef dp = CGDataProviderCreateWithCFData(( CFDataRef)jpegData);
CGImageRef cgImage = CGImageCreateWithJPEGDataProvider(dp, NULL, true, kCGRenderingIntentDefault);
[[UIImage imageWithCGImage:cgImage] drawInRect:CGRectMake(513, 314, 135, 135)];
}
Run Code Online (Sandbox Code Playgroud)
有关如何做到这一点的任何建议?我知道如何使用带有UIImageView的CALayers来实现它,但由于我没有视图,因此不确定.
我正在接受一个NSDate,只拉一个2位数字,代表一个月中的某一天进入NSString.其中一个日期是:
2013-11-30 00:00:00 +0000
我用:
NSDateFormatter *formatter2 = [[NSDateFormatter alloc] init];
[formatter2 setDateFormat:@"dd"];
NSString *datefromdate = [formatter2 stringFromDate:articleDate];
NSLog(@"Date%@", datefromdate);
[formatter2 release];
Run Code Online (Sandbox Code Playgroud)
但是日志又回来了
29
Run Code Online (Sandbox Code Playgroud) 我有一个应用程序,显示不同文件的表视图.我已将其设置为异步下载,并希望所选单元格显示进度条.我整个下午都在网上看过,到目前为止我发现的一切似乎都不完整,如何做到这一点.这是我目前为止下载的代码,并设置为具有progressview show下载状态.
码:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
RSSEntry *entry = [_allEntries objectAtIndex:indexPath.row];
NSURL *url = [NSURL URLWithString:entry.articleUrl];
self.nameit = entry.articleTitle;
NSURLRequest *theRequest = [NSURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:60];
receivedData = [[NSMutableData alloc] initWithLength:0];
NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self startImmediately:YES];
}
- (void) connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
progress.hidden = NO;
[receivedData setLength:0];
expectedBytes = [response expectedContentLength];
}
- (void) connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
[receivedData appendData:data];
float progressive = (float)[receivedData length] / (float)expectedBytes; …
Run Code Online (Sandbox Code Playgroud) 我有一个tableview,它只有一个单元格.我希望这个单元格位于视图框架的底部,但我不确定如何执行此操作.任何帮助,将不胜感激.表视图附加了一个.xib,并按1个部分和一个单元格进行分组.
我使用一个简单的导航控制器,使用IB在其上添加了一个集合视图.我在标题中声明了集合视图的委托和数据源,并在IB中将其连接起来.集合视图填充所有图像,并将滚动,但从不调用didSelectItemAtIndexPath.到底是怎么回事?
对不起,在我点击提交之前忘了复制代码.
- (void)viewDidLoad
{
[super viewDidLoad];
arryData = [[NSArray alloc] initWithObjects:@"AIMCON", @"Devotional Songs", @"Saved Devotionals", @"Resources", @"Podcasts", @"Website", @"Links", nil];
CALayer * l = [viewofimage layer];
[l setMasksToBounds:YES];
[l setCornerRadius:11];
[l setBorderWidth:2.0];
[l setBorderColor:[[UIColor blackColor] CGColor]];
tableView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0);
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
[self.collectionView registerClass:[CVCell class] forCellWithReuseIdentifier:@"cvCell"];
self.collectionView.backgroundColor = [UIColor blackColor];
}
else {
[self.collectionView registerClass:[CVCell class] forCellWithReuseIdentifier:@"cvCell"];
self.collectionView.backgroundColor = [UIColor blackColor];
}
// Do any additional setup after loading the view.
}
-(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView …
Run Code Online (Sandbox Code Playgroud) ios ×5
xcode ×3
asynchronous ×1
build ×1
download ×1
iphone ×1
nsdate ×1
nsstring ×1
objective-c ×1
tableview ×1
uiimage ×1
uiimageview ×1
uitableview ×1