我的卷轴有一些观点cornerRadius = 10.0和masksToBounds = YES.
这会导致滚动滚动视图时出现性能问题.虽然我尝试了每个视图的shouldRasterize设置YES,但问题仍未解决.
但是,我知道这个问题的解决方案.这masksToBound就是设定的NO.(masksToBound's默认值为NO)虽然masksToBound是NO,我的视角仍然有曲线,性能问题也解决了.
我想知道cornerRadius和之间的关系masksToBounds.我害怕这个设置的意外问题.
谢谢.
在我的应用程序中,我UITextView在文本视图下方有一个按钮,可以UITextView在编辑时插入照片.
我的要求是用户用户能够在其中编辑文本,并在需要时插入图像.
与StackOverflow的应用程序类似UITextView:

我正在努力ZBarReader并得到一个错误
ZBarReaderViewInterface Builder文件中的未知类
[UIView setReaderDelegate:]:无法识别的选择器发送到实例0x6859f20
请查看此处或下方的附加图像,以便您可以了解到目前为止我正在做的事情: -

在故事板中,我有一个视图,它的自定义类是ZBarReadView.我也用IBOutlet头文件连接它.在m文件中,我这样做
viewReader.readerDelegate = self;
在此之后显示错误.
任何人都可以指出我搞砸了......
我有或多或少的基本UITableViewController使用NSFetchedResultsController.在UITableViewController被压入navigationController's堆栈.但推送动画并不流畅,因为提取NSFetchedResultsController是在主线程上执行的,因此会阻止UI.
我的问题是:如何NSFetchedResultsController在后台线程中执行获取以保持动画流畅?
在NSFetchedResultsController与委托方法是这样的:
- (NSFetchedResultsController *)fetchedResultsController
{
if (_fetchedResultsController != nil) {
return _fetchedResultsController;
}
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
// Edit the entity name as appropriate.
NSEntityDescription *entity = [NSEntityDescription entityForName:@"GPGrade" inManagedObjectContext:self.managedObjectContext];
[fetchRequest setEntity:entity];
// Set the batch size to a suitable number.
[fetchRequest setFetchBatchSize:20];
//Set predicate
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"parent == %@", self.subject];
[fetchRequest setPredicate:predicate];
// Edit the sort key as appropriate. …Run Code Online (Sandbox Code Playgroud) multithreading core-data uiviewcontroller nsfetchedresultscontroller ios
我曾经以演示风格呈现UIViewController另一个.但它不允许我旋转(新呈现)UIViewControllerUIModalPresentationCurrentContextpresentingviewcontrollerUIViewControllerUIViewController
self.modalPresentationStyle = UIModalPresentationCurrentContext;
NewViewController *newViewController = [[NewViewController alloc] initWithNibName:@"NewViewController" Bundle: nil];
[self presentViewController:newViewController animated:YES completion:nil];
Run Code Online (Sandbox Code Playgroud)
当我旋转设备将旋转newViewController和statusbar,但不presentingViewController
PS:这presentingViewController是self.

我有一个应用程序,其中我有一个UITableView内部a UIView,它再次在一个内部UIScrollView,所以层次结构变成这样:
UIScrollView- > UIView- >UITableView
我内部的数据UITableView填写正确.
现在,我的问题是,当我滚动我UITableView的UIScrollView's委托方法scrollViewDidEndDecelerating:和scrollViewDidEndDragging::被调用.
我不想要这种行为,我该怎么做才能阻止这种行为?
任何人请帮助,谢谢!
我需要你的帮助UIActivityViewController.我需要为文件提供活动控制器,除了默认操作,用户将能够在其他应用程序中打开该文件.我知道如何使用UIDocumentController,它显示popover所有应用程序能够打开文件.但是,我如何才能展示所有这些应用程序UIActivityViewController?
PS此行为可以在Apple Mail应用程序中看到,例如.
我使用在[此处] [1]找到的代码将图像附加到使用拍摄的视频上UIImagePickerController。
视频是纵向的,并且可以正常播放,但是一旦我使用AVURLASSet它,就将其方向改为横向而不是纵向,我找不到原因了吗?
谁能指出我正确的方向?
我的代码:
-(IBAction)addWaterMark:(id)sender {
AVURLAsset* videoAsset = [[AVURLAsset alloc]initWithURL:[NSURL fileURLWithPath:tempPath] options:nil];
AVMutableComposition* mixComposition = [AVMutableComposition composition];
AVMutableCompositionTrack *compositionVideoTrack = [mixComposition addMutableTrackWithMediaType:AVMediaTypeVideo preferredTrackID:kCMPersistentTrackID_Invalid];
AVAssetTrack *clipVideoTrack = [[videoAsset tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0];
[compositionVideoTrack insertTimeRange:CMTimeRangeMake(kCMTimeZero, videoAsset.duration)
ofTrack:clipVideoTrack
atTime:kCMTimeZero error:nil];
[compositionVideoTrack setPreferredTransform:[[[videoAsset tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0] preferredTransform]];
CGSize videoSize = [videoAsset naturalSize];
NSLog(@"%f %f",videoSize.width,videoSize.height);
}
Run Code Online (Sandbox Code Playgroud)
在这一点上我得到480360而不是temppath的正确大小
我从apple下载了PageControl示例代码.这是一个带有的项目UIPageControl.我改变了它,以便UIScrollView有不同的看法.对于我想要添加的每个视图,我创建了一个UINavigationController带有或rootViewController作为其子类的.然后我加入了,视图.UIViewControllerUITableViewControllerUIScrollViewnavigationController
现在让我说我是第一个观点.我想显示一个模态视图控制器.当我关闭它时,父视图控制器(HomeViewController在我的示例中)是全屏,而不是之前的大小,这将显示底部的页面控件.我能使其正常工作的唯一方法是在解散后调整帧大小,但这是一个糟糕的用户体验,因为它是在显示父视图控制器后调用的.关于如何HomeViewController在解雇模态视图控制器时避免调整框架大小的任何想法?
-(void)dismissMVC:(id)sender {
CGRect frame = self.view.frame;
[self dismissViewControllerAnimated:YES completion:^{
self.view.frame = frame;
}];
}
- (void)loadScrollViewWithPage:(int)page
{
if (page < 0)
return;
if (page >= kNumberOfPages)
return;
// replace the placeholder if necessary
switch (page) {
case Home:
{
HomeViewController *controller = [viewControllers objectAtIndex:page];
if ((NSNull *)controller == [NSNull null])
{
controller = [[HomeViewController alloc] initWithPageNumber:page];
[viewControllers replaceObjectAtIndex:page withObject:controller];
[controller release];
} …Run Code Online (Sandbox Code Playgroud) 我们有UITableView一个searchbar与添加的searchDisplayController.
我们希望在整个应用程序中保持半透明状态.
我对导航栏和其他栏有半透明效果,但在使用显示控制器时没有搜索栏.在应用程序的一部分,当我们使用搜索栏而不是显示控制器时,半透明度设置正确.
如何UISearchBar将显示控制器的半透明属性设置为NO?
编辑:这是我的代码 viewDidLoad
self.navigationController.navigationBar.translucent = NO;
BOOL t = self.searchDisplayController.searchBar.translucent;
self.searchDisplayController.searchBar.translucent = NO;
self.navigationController.navigationBar.barTintColor = [UIColor redColor];
self.searchDisplayController.searchBar.barTintColor = [UIColor redColor];
UIBarStyle b1 = self.searchDisplayController.searchBar.barStyle;
UISearchBarStyle b2 = self.searchDisplayController.searchBar.searchBarStyle;
BOOL t2 = self.searchDisplayController.searchBar.translucent;
Run Code Online (Sandbox Code Playgroud)
在调试器中运行,t = YES,t2 = YES.b1 = UIBarStyleDefault和b2 = UISearchBarStyleDefault.我在错误的位置设置NO吗?香港专业教育学院尝试过storyboard这里的设置viewDidLoad
ios ×8
iphone ×8
objective-c ×5
ipad ×2
uitableview ×2
avfoundation ×1
avurlasset ×1
calayer ×1
core-data ×1
cornerradius ×1
ios7 ×1
uiimageview ×1
uisearchbar ×1
uitextview ×1
video ×1
xcode ×1