●試験問題及び説明
10314 ワード
※選択問題(計25問、1問3点)
1、 : :(A)
A、 ,
B、 ,
C、 , APP Delegate
D、 , ,
#1. : :First Responser -- > The Window -- >The Application -- > App Delegate
2、 : :(C)
A、 , 、 ,
B、 , 2 ( 2 )
C、 ,
D、
# 2. : , ,
3、 Student : :(A)
A、+ (id)studentWithName:(NSString *)newName andAge:(int)newAge
{
Student *stu = [[[Student alloc] initWithName:newName andAge:newAge] autorelease];
return stu;
}
B、 - (id)studentWithName:(NSString *)newName andAge:(int)newAge
{
Student *stu = [[Student alloc] initWithName:newName andAge:newAge];
return [stu autorelease];
}
C、 - (void)studentWithName:(NSString *)newName andAge:(int)newAge
{
Student *stu = [[Student alloc] initWithName:newName andAge:newAge];
return [stu autorelease];
}
D、 + (void)studentWithName:(NSString *)newName andAge:(int)newAge
{
Student *stu = [[Student alloc] initWithName:newName andAge:newAge];
return [stu autorelease];
}
# 3. : (+ );
4、 tableview window cell indexPath : :(B)
A、- (UITableViewCell *)cellForRowAtIndexPath:(NSIndexPath *)indexPath;
B、- (NSArray *)indexPathsForVisibleRows;
C、- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath;
D、- (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath;
# 4. : UITableView
5、 : :(A)
A、 , 。
B、 。
C、 , 。
D、 。
# 5. : ,
6、 OC : :(B)
A、OC
B、autorelease pool OC
C、alloc、new copy , release autorelease
D、OC C ,
# 6. : (Autorelease pool) OC , 。 , release
7、 :
@implementation Person
- (void)setAge:(int)newAge {
self.age = newAge;
}
@end :(B)
A、
B、
C、
D、
# 7。 : set get ,
8、 UIScrollViewController,scrollView , : :(D)
A、- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView;{ }
B、- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView;{ }
C、- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView;{ }
D、- (void)scrollViewWillBeginDecelerating:
# 8. : UIScrollView
9、 UIControl :(D)
A、UIButton
B、UITextField
C、UISlider
D、UITextView
# 9. :UITextView( ) UIScrollView;
10、 UIView、UIWindow CALayer : :(C)
A、UIView UIResponder
B、UIResponder NSObject,UIView 。
C、UIResponder NSObject,CALayer NSObject,CALayer 。
D、UIView , ,CALayer , UIView
# 10. :CALayers , UIView CALayer, ( ) layer
11、 frame bounds : :(A)
A、bounds view window
B、frame view superview
C、frame bounds UIView (property)。
D、 , 。
# 11. :bounds
12、 , 。 :(B)
A、- (void)applicationExitsOnSuspend:(UIApplication *)application{ }
B、- (void)applicationDidEnterBackground:(UIApplication *)application{ }
C、- (void)applicationWillTerminate:(UIApplication *)application{ }
D、- (void)applicationDidFinishLaunching:(UIApplication *)application{ }
# 12. :
13、 UITableViewController delegate assign retain, : :(D)
A、
B、
C、
D、
# 13. :
14、 ios : :(D)
A、NSThread
B、NSOperationQueue
C、Grand Central Dispatch(GCD)
D、NSURLRequest
# 14. :NSURLRequest
15、 UISearchBar, ( ), : :(C) ( )
A、- (void)searchBarTextDidEndEditing:(UISearchBar *)searchBar;
B、- (BOOL)searchBarShouldEndEditing:(UISearchBar *)searchBar;
C、- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText{ }
D、- (void)searchBarResultsListButtonClicked:(UISearchBar *)searchBar{ }
# 15. :
16、 : :(D)
A、barStyle bar
B、translucent bar
C、backgroundImage bar
D、barTintColor bar
# 16. :barTintColor
17、 , : :(B)
A、- (void)applicationDidFinishLaunching:(UIApplication*)application{ }
B、- (void)applicationWillEnterForeground:(UIApplication *)application{ }
C、- (void)applicationDidBecomeActive:(UIApplication *)application{ }
D、 - (void)applicationWillTerminate:(UIApplication *)application{ }
# 17. :Foreground
18、 singleton , : :(A)
A、static LOSingleton * shareInstance == nil;
+ ( LOSingleton *)sharedInstance{
@synchronized(self){
if (shareInstance == nil) {
shareInstance = [[self alloc] init];
}
}
return shareInstance;
}
B、static LOSingleton * shareInstance;
- ( LOSingleton *)sharedInstance{
@synchronized(self){
if (shareInstance == nil) {
shareInstance = [[self alloc] init];
}
}
return shareInstance;
}
C、+ (LOSingleton *) sharedInstance
{
LOSingleton *sharedInstance = nil ;
static dispatch_once_t onceToken;
dispatch_once (& onceToken, ^ {
sharedInstance = [[self alloc] init];
});
return sharedInstance;
}
D、- (LOSingleton *) sharedInstance
{
static LOSingleton *sharedInstance = nil ;
static dispatch_once_t onceToken;
dispatch_once (& onceToken, ^ {
sharedInstance = [[self alloc] init];
});
return sharedInstance;
}
# 18. :1. (+ )2.static LOSingleton *sharedInstance == nil ; static
19、 , , , , : :(D)
A、- (void)applicationDidBecomeActive:(UIApplication *)application{ }
B、- (void)applicationDidEnterBackground:(UIApplication *)application{ }
C、- (void)applicationWillTerminate:(UIApplication *)application{ }
D、- (void)applicationWillResignActive:(UIApplication *)application{ }
# 19. :D
//
20、 :
① UIApplication , ViewController
② main UIApplication UIApplication
③ ViewController , 。 :(B)
A、①②③
B、②①③
C、①③②
D、③①②
# 20. : : Mian
// UICollectionViewController
21、 UICollectionViewController, margin( - - - ) : :(B)
A、- (CGSize)collectionView:(UICollectionView *)collectionView
layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
{
return CGSizeMake();
}
B、- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView
layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section
{
return UIEdgeInsetsMake();
}
C、- (CGSize)collectionView:(UICollectionView *)collectionView
layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section
{
return CGSizeMake();
}
D、- (CGSize)collectionView:(UICollectionView *)collectionView
layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForFooterInSection:(NSInteger)section
{
return CGSizeMake();
}
#21. : - - - , B
// contentInset UIScrollView ( 、 、 、 )
22、 UIScrollView , : :(D)
A、bounces
B、pagingEnabled
C、scrollEnabled
D、contentInset
23、 UIScrollViewController, : :(A)
A、contentOffSet
B、contentSize
C、contentInset
D、scrollIndicatorInsets
# 23. :1.contentOffSet // contentSize // UIScrollView
24、 MVC ,M C , ? :(A)
A、KVO
B、 -
C、
D、
# 24. :M--C (KVO ) C--V ( - )
25、 UILabel, : :(B)
A、textAlignment
B、lineBreakMode
C、numberOfLines
D、sizeToFit
# 25. :textAlignment // numberOfLines // , 0,
※ ( 5 , 5 )
1、UISlider、UISwitch、UITextField UIControl 。 :(T)
# 26. :
2、[textField resignFirstResponder]; , 。 :(F)
# 27. :[textField resignFirstResponder];
//
3、[self.view popToViewController: animated: YES]; , 。 :(F)
# 28. :push ,pop
4、numberOfTapsRequired 。 :(F)
# 29. : // numberOfTapsRequired
5、[segmentedControl titleForSegmentAtIndex: ] 。 :(T)
# 30. :