Draw a waveform diagram

Source: Internet
Author: User

Draw a waveform diagram

Effect

Source

Https://github.com/YouXianMing/Animations

////DRAWWAVEVIEWCONTROLLER.M//Animations////Created by youxianming on 15/12/5.//copyright©2015 year youxianming. All rights reserved.//#import "DrawWaveViewController.h"#import "WxHxD.h"#import "DrawView.h"#import "DrawLineView.h"#import "uiview+setrect.h"@interfaceDrawwaveviewcontroller () @property (nonatomic, strong) Drawview*Drawview, @property (nonatomic, strong) Drawlineview*Drawlineview, @property (nonatomic, strong) Cadisplaylink*DisplayLink;@end@implementationDrawwaveviewcontroller- (void) viewdidload {[Super viewdidload];}- (void) Setup {[Super Setup]; Self.drawview= [[Drawview alloc] Initwithframe:cgrectmake (0,0, Width, $)]; Self.drawView.center=Self.view.center; Self.drawview.y+= -;        [Self.view AddSubview:self.drawView]; Self.drawlineview= [[Drawlineview alloc] Initwithframe:cgrectmake (0,0, Width, $)]; Self.drawLineView.center=Self.view.center; Self.drawlineview.y-= -;        [Self.view AddSubview:self.drawLineView]; Self.displaylink=[Cadisplaylink displaylinkwithtarget:self selector: @selector (drawevent)];        [Self.displaylink Addtorunloop:[nsrunloop Currentrunloop] formode:nsdefaultrunloopmode]; [Self Bringtitleviewtofront];}- (void) drawevent {[Self.drawview setneedsdisplay]; [Self.drawlineview Setneedsdisplay];}@end

Details

Draw a waveform diagram

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.