一,效果图。

【代码笔记】iOS-cell折叠

二,工程图。

【代码笔记】iOS-cell折叠

三,代码。

AppDelegate.h

【代码笔记】iOS-cell折叠
#import <UIKit/UIKit.h>
//加入头文件
#import "myQQView.h"

@interface AppDelegate : UIResponder <UIApplicationDelegate>
{
    myQQView *qqview;
}

@property (strong, nonatomic) UIWindow *window;

@end
【代码笔记】iOS-cell折叠

 

AppDelegate.m

【代码笔记】iOS-cell折叠
#import "AppDelegate.h"

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
    
    //cell折叠
    qqview=[[myQQView alloc] init];
    [self.window addSubview:qqview.view];

    
    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];
    return YES;
}
【代码笔记】iOS-cell折叠

相关文章: