最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

iOS音樂播放器實現(xiàn)代碼完整版

 更新時間:2018年05月17日 09:08:31   作者:imnathaniel2  
這篇文章主要為大家詳細介紹了iOS音樂播放器實現(xiàn)代碼完整版,包括音頻列表、播放器、后臺播放、鎖屏播放,具有一定的參考價值,感興趣的小伙伴們可以參考一下

本文實例為大家分享了iOS實現(xiàn)音樂播放器的具體代碼,供大家參考,具體內(nèi)容如下

audio_queue.cpp

/*
 * This file is part of the FreeStreamer project,
 * (C)Copyright 2011-2013 Matias Muhonen.
 * See the file ''LICENSE'' for using the code.
 *
 * Part of the code in this file has been rewritten from
 * the AudioFileStreamExample / afsclient.cpp
 * example, Copyright © 2007 Apple Inc.
 *
 * The threadless playback has been adapted from
 * Alex Crichton's AudioStreamer.
 */

#include "audio_queue.h"

#include <cassert>

//#define AQ_DEBUG 1

#if !defined (AQ_DEBUG)
 #define AQ_TRACE(...) do {} while (0)
#else
 #define AQ_TRACE(...) printf(__VA_ARGS__)
#endif

namespace astreamer {
 
typedef struct queued_packet {
 AudioStreamPacketDescription desc;
 struct queued_packet *next;
 char data[];
} queued_packet_t;
 
/* public */ 
 
Audio_Queue::Audio_Queue()
 : m_delegate(0),
 m_state(IDLE),
 m_outAQ(0),
 m_fillBufferIndex(0),
 m_bytesFilled(0),
 m_packetsFilled(0),
 m_buffersUsed(0),
 m_processedPacketsSizeTotal(0),
 m_processedPacketsCount(0),
 m_audioQueueStarted(false),
 m_waitingOnBuffer(false),
 m_queuedHead(0),
 m_queuedTail(0),
 m_lastError(noErr)
{
 for (size_t i=0; i < AQ_BUFFERS; i++) {
  m_bufferInUse[i] = false;
 }
}
 
Audio_Queue::~Audio_Queue()
{
 stop(true);
 
 cleanup();
}
 
bool Audio_Queue::initialized()
{
 return (m_outAQ != 0);
}
 
void Audio_Queue::start()
{
 // start the queue if it has not been started already
 if (m_audioQueueStarted) {
  return;
 }
   
 OSStatus err = AudioQueueStart(m_outAQ, NULL);
 if (!err) {
  m_audioQueueStarted = true;
  m_lastError = noErr;
 } else {
  AQ_TRACE("%s: AudioQueueStart failed!\n", __PRETTY_FUNCTION__);
  m_lastError = err;
 }
}
 
void Audio_Queue::pause()
{
 if (m_state == RUNNING) {
  if (AudioQueuePause(m_outAQ) != 0) {
   AQ_TRACE("%s: AudioQueuePause failed!\n", __PRETTY_FUNCTION__);
  }
  setState(PAUSED);
 } else if (m_state == PAUSED) {
  AudioQueueStart(m_outAQ, NULL);
  setState(RUNNING);
 }
}
 
void Audio_Queue::stop()
{
 stop(true);
}

void Audio_Queue::stop(bool stopImmediately)
{
 if (!m_audioQueueStarted) {
  AQ_TRACE("%s: audio queue already stopped, return!\n", __PRETTY_FUNCTION__);
  return;
 }
 m_audioQueueStarted = false;
 
 AQ_TRACE("%s: enter\n", __PRETTY_FUNCTION__);

 if (AudioQueueFlush(m_outAQ) != 0) {
  AQ_TRACE("%s: AudioQueueFlush failed!\n", __PRETTY_FUNCTION__);
 }
 
 if (stopImmediately) {
  AudioQueueRemovePropertyListener(m_outAQ,
           kAudioQueueProperty_IsRunning,
           audioQueueIsRunningCallback,
           this);
 }
 
 if (AudioQueueStop(m_outAQ, stopImmediately) != 0) {
  AQ_TRACE("%s: AudioQueueStop failed!\n", __PRETTY_FUNCTION__);
 }
 
 if (stopImmediately) {
  setState(IDLE);
 }
 
 AQ_TRACE("%s: leave\n", __PRETTY_FUNCTION__);
}
 
double Audio_Queue::packetDuration()
{
 return m_streamDesc.mFramesPerPacket / m_streamDesc.mSampleRate;
}
 
unsigned Audio_Queue::timePlayedInSeconds()
{
 unsigned timePlayed = 0;
 
 AudioTimeStamp queueTime;
 Boolean discontinuity;
 
 OSStatus err = AudioQueueGetCurrentTime(m_outAQ, NULL, &queueTime, &discontinuity);
 if (err) {
  goto out;
 }
 
 timePlayed = queueTime.mSampleTime / m_streamDesc.mSampleRate;
 
out:
 return timePlayed;
}
 
unsigned Audio_Queue::bitrate()
{
 unsigned bitrate = 0;
 
 double packetDuration = this->packetDuration();
 
 if (packetDuration > 0 && m_processedPacketsCount > 50) {
  double averagePacketByteSize = m_processedPacketsSizeTotal / m_processedPacketsCount;
  bitrate = 8 * averagePacketByteSize / packetDuration;
 }
 
 return bitrate;
}

void Audio_Queue::handlePropertyChange(AudioFileStreamID inAudioFileStream, AudioFileStreamPropertyID inPropertyID, UInt32 *ioFlags)
{
 OSStatus err = noErr;
 
 AQ_TRACE("found property '%lu%lu%lu%lu'\n", (inPropertyID>>24)&255, (inPropertyID>>16)&255, (inPropertyID>>8)&255, inPropertyID&255);
 
 switch (inPropertyID) {
  case kAudioFileStreamProperty_ReadyToProducePackets:
  {
   cleanup();
   
   // the file stream parser is now ready to produce audio packets.
   // get the stream format.
   memset(&m_streamDesc, 0, sizeof(m_streamDesc));
   UInt32 asbdSize = sizeof(m_streamDesc);
   err = AudioFileStreamGetProperty(inAudioFileStream, kAudioFileStreamProperty_DataFormat, &asbdSize, &m_streamDesc);
   if (err) {
    AQ_TRACE("%s: error in kAudioFileStreamProperty_DataFormat\n", __PRETTY_FUNCTION__);
    m_lastError = err;
    break;
   }
   
   // create the audio queue
   err = AudioQueueNewOutput(&m_streamDesc, audioQueueOutputCallback, this, CFRunLoopGetCurrent(), NULL, 0, &m_outAQ);
   if (err) {
    AQ_TRACE("%s: error in AudioQueueNewOutput\n", __PRETTY_FUNCTION__);
    
    if (m_delegate) {
     m_delegate->audioQueueInitializationFailed();
    }
    
    m_lastError = err;
    break;
   }
   
   // allocate audio queue buffers
   for (unsigned int i = 0; i < AQ_BUFFERS; ++i) {
    err = AudioQueueAllocateBuffer(m_outAQ, AQ_BUFSIZ, &m_audioQueueBuffer[i]);
    if (err) {
     /* If allocating the buffers failed, everything else will fail, too.
      * Dispose the queue so that we can later on detect that this
      * queue in fact has not been initialized.
      */
     
     AQ_TRACE("%s: error in AudioQueueAllocateBuffer\n", __PRETTY_FUNCTION__);
     
     (void)AudioQueueDispose(m_outAQ, true);
     m_outAQ = 0;
     
     if (m_delegate) {
      m_delegate->audioQueueInitializationFailed();
     }
     
     m_lastError = err;
     break;
    }
   }
   
   setCookiesForStream(inAudioFileStream);
   
   // listen for kAudioQueueProperty_IsRunning
   err = AudioQueueAddPropertyListener(m_outAQ, kAudioQueueProperty_IsRunning, audioQueueIsRunningCallback, this);
   if (err) {
    AQ_TRACE("%s: error in AudioQueueAddPropertyListener\n", __PRETTY_FUNCTION__);
    m_lastError = err;
    break;
   }
   
   break;
  }
 }
}

void Audio_Queue::handleAudioPackets(UInt32 inNumberBytes, UInt32 inNumberPackets, const void *inInputData, AudioStreamPacketDescription *inPacketDescriptions)
{
 if (!initialized()) {
  AQ_TRACE("%s: warning: attempt to handle audio packets with uninitialized audio queue. return.\n", __PRETTY_FUNCTION__);
  
  return;
 }
 
 // this is called by audio file stream when it finds packets of audio
 AQ_TRACE("got data. bytes: %lu packets: %lu\n", inNumberBytes, inNumberPackets);
 
 /* Place each packet into a buffer and then send each buffer into the audio
  queue */
 UInt32 i;
 
 if (!inPacketDescriptions) {
  AQ_TRACE("%s: notice: supplying the packet descriptions for a supposed CBR data.\n", __PRETTY_FUNCTION__);
  
  // If no packet descriptions are supplied, assume we are dealing with CBR data
  UInt32 base = inNumberBytes / inNumberPackets;
  AudioStreamPacketDescription *descriptions = new AudioStreamPacketDescription[inNumberPackets];
  
  for (i = 0; i < inNumberPackets; i++) {
   descriptions[i].mStartOffset = (base * i);
   descriptions[i].mDataByteSize = base;
   descriptions[i].mVariableFramesInPacket = 0;
  }
  inPacketDescriptions = descriptions;
  
  m_cbrPacketDescriptions.push_back(descriptions);
 }
 
 for (i = 0; i < inNumberPackets && !m_waitingOnBuffer && m_queuedHead == NULL; i++) {
  AudioStreamPacketDescription *desc = &inPacketDescriptions[i];
  int ret = handlePacket((const char*)inInputData + desc->mStartOffset, desc);
  if (!ret) break;
 }
 if (i == inNumberPackets) {
  return;
 }
 
 for (; i < inNumberPackets; i++) {
  /* Allocate the packet */
  UInt32 size = inPacketDescriptions[i].mDataByteSize;
  queued_packet_t *packet = (queued_packet_t *)malloc(sizeof(queued_packet_t) + size);
  
  /* Prepare the packet */
  packet->next = NULL;
  packet->desc = inPacketDescriptions[i];
  packet->desc.mStartOffset = 0;
  memcpy(packet->data, (const char *)inInputData + inPacketDescriptions[i].mStartOffset,
    size);
  
  if (m_queuedHead == NULL) {
   m_queuedHead = m_queuedTail = packet;
  } else {
   m_queuedTail->next = packet;
   m_queuedTail = packet;
  }
 }
}
 
int Audio_Queue::handlePacket(const void *data, AudioStreamPacketDescription *desc)
{
 if (!initialized()) {
  AQ_TRACE("%s: warning: attempt to handle audio packets with uninitialized audio queue. return.\n", __PRETTY_FUNCTION__);
  
  return -1;
 }
 
 AQ_TRACE("%s: enter\n", __PRETTY_FUNCTION__);
 
 UInt32 packetSize = desc->mDataByteSize;
 
 /* This shouldn't happen because most of the time we read the packet buffer
  size from the file stream, but if we restored to guessing it we could
  come up too small here */
 if (packetSize > AQ_BUFSIZ) {
  AQ_TRACE("%s: packetSize %lli > AQ_BUFSIZ %li\n", __PRETTY_FUNCTION__, packetSize, AQ_BUFSIZ);
  return -1;
 }
 
 // if the space remaining in the buffer is not enough for this packet, then
 // enqueue the buffer and wait for another to become available.
 if (AQ_BUFSIZ - m_bytesFilled < packetSize) {
  int hasFreeBuffer = enqueueBuffer();
  if (hasFreeBuffer <= 0) {
   return hasFreeBuffer;
  }
 } else {
  AQ_TRACE("%s: skipped enqueueBuffer AQ_BUFSIZ - m_bytesFilled %lu, packetSize %lli\n", __PRETTY_FUNCTION__, (AQ_BUFSIZ - m_bytesFilled), packetSize);
 }
 
 m_processedPacketsSizeTotal += packetSize;
 m_processedPacketsCount++;
 
 // copy data to the audio queue buffer
 AudioQueueBufferRef buf = m_audioQueueBuffer[m_fillBufferIndex];
 memcpy((char*)buf->mAudioData + m_bytesFilled, data, packetSize);
 
 // fill out packet description to pass to enqueue() later on
 m_packetDescs[m_packetsFilled] = *desc;
 // Make sure the offset is relative to the start of the audio buffer
 m_packetDescs[m_packetsFilled].mStartOffset = m_bytesFilled;
 // keep track of bytes filled and packets filled
 m_bytesFilled += packetSize;
 m_packetsFilled++;
 
 /* Maximum number of packets which can be contained in one buffer */
#define kAQMaxPacketDescs 512
 
 /* If filled our buffer with packets, then commit it to the system */
 if (m_packetsFilled >= kAQMaxPacketDescs) {
  return enqueueBuffer();
 }
 return 1;
}

/* private */
 
void Audio_Queue::cleanup()
{
 if (!initialized()) {
  AQ_TRACE("%s: warning: attempt to cleanup an uninitialized audio queue. return.\n", __PRETTY_FUNCTION__);
  
  return;
 }
 
 if (AudioQueueDispose(m_outAQ, true) != 0) {
  AQ_TRACE("%s: AudioQueueDispose failed!\n", __PRETTY_FUNCTION__);
 }
 m_outAQ = 0;
 m_fillBufferIndex = m_bytesFilled = m_packetsFilled = m_buffersUsed = m_processedPacketsSizeTotal = m_processedPacketsCount = 0;
 
 for (size_t i=0; i < AQ_BUFFERS; i++) {
  m_bufferInUse[i] = false;
 }
 
 queued_packet_t *cur = m_queuedHead;
 while (cur) {
  queued_packet_t *tmp = cur->next;
  free(cur);
  cur = tmp;
 }
 m_queuedHead = m_queuedHead = 0;
 
 for (size_t i=0; i < m_cbrPacketDescriptions.size(); i++) {
  delete[] m_cbrPacketDescriptions[i];
 }
 m_cbrPacketDescriptions.clear();
 
 m_waitingOnBuffer = false;
 m_lastError = noErr;
}
 
void Audio_Queue::setCookiesForStream(AudioFileStreamID inAudioFileStream)
{
 OSStatus err;
 
 // get the cookie size
 UInt32 cookieSize;
 Boolean writable;
 
 err = AudioFileStreamGetPropertyInfo(inAudioFileStream, kAudioFileStreamProperty_MagicCookieData, &cookieSize, &writable);
 if (err) {
  AQ_TRACE("error in info kAudioFileStreamProperty_MagicCookieData\n");
  return;
 }
 AQ_TRACE("cookieSize %lu\n", cookieSize);
 
 // get the cookie data
 void* cookieData = calloc(1, cookieSize);
 err = AudioFileStreamGetProperty(inAudioFileStream, kAudioFileStreamProperty_MagicCookieData, &cookieSize, cookieData);
 if (err) {
  AQ_TRACE("error in get kAudioFileStreamProperty_MagicCookieData");
  free(cookieData);
  return;
 }
 
 // set the cookie on the queue.
 err = AudioQueueSetProperty(m_outAQ, kAudioQueueProperty_MagicCookie, cookieData, cookieSize);
 free(cookieData);
 if (err) {
  AQ_TRACE("error in set kAudioQueueProperty_MagicCookie");
 }
}
 
void Audio_Queue::setState(State state)
{
 if (m_state == state) {
  /* We are already in this state! */
  return;
 }
 
 m_state = state;
 
 if (m_delegate) {
  m_delegate->audioQueueStateChanged(m_state);
 }
}

int Audio_Queue::enqueueBuffer()
{
 assert(!m_bufferInUse[m_fillBufferIndex]);
 
 AQ_TRACE("%s: enter\n", __PRETTY_FUNCTION__);
 
 m_bufferInUse[m_fillBufferIndex] = true;
 m_buffersUsed++;
 
 // enqueue buffer
 AudioQueueBufferRef fillBuf = m_audioQueueBuffer[m_fillBufferIndex];
 fillBuf->mAudioDataByteSize = m_bytesFilled;
 
 assert(m_packetsFilled > 0);
 OSStatus err = AudioQueueEnqueueBuffer(m_outAQ, fillBuf, m_packetsFilled, m_packetDescs);
 if (!err) {
  m_lastError = noErr;
  start();
 } else {
  /* If we get an error here, it very likely means that the audio queue is no longer
   running */
  AQ_TRACE("%s: error in AudioQueueEnqueueBuffer\n", __PRETTY_FUNCTION__);
  m_lastError = err;
  return 1;
 }
 
 // go to next buffer
 if (++m_fillBufferIndex >= AQ_BUFFERS) {
  m_fillBufferIndex = 0; 
 }
 // reset bytes filled
 m_bytesFilled = 0;
 // reset packets filled
 m_packetsFilled = 0;
 
 // wait until next buffer is not in use
 if (m_bufferInUse[m_fillBufferIndex]) {
  AQ_TRACE("waiting for buffer %lu\n", m_fillBufferIndex);
  
  if (m_delegate) {
   m_delegate->audioQueueOverflow();
  }
  m_waitingOnBuffer = true;
  return 0;
 }
 
 return 1;
}
 
int Audio_Queue::findQueueBuffer(AudioQueueBufferRef inBuffer)
{
 for (unsigned int i = 0; i < AQ_BUFFERS; ++i) {
  if (inBuffer == m_audioQueueBuffer[i]) {
   AQ_TRACE("findQueueBuffer %i\n", i);
   return i;
  }
 }
 return -1;
}
 
void Audio_Queue::enqueueCachedData()
{
 assert(!m_waitingOnBuffer);
 assert(!m_bufferInUse[m_fillBufferIndex]);
 
 /* Queue up as many packets as possible into the buffers */
 queued_packet_t *cur = m_queuedHead;
 while (cur) {
  int ret = handlePacket(cur->data, &cur->desc);
  if (ret == 0) {
   break; 
  }
  queued_packet_t *next = cur->next;
  free(cur);
  cur = next;
 }
 m_queuedHead = cur;
 
 /* If we finished queueing all our saved packets, we can re-schedule the
  * stream to run */
 if (cur == NULL) {
  m_queuedTail = NULL;
  if (m_delegate) {
   m_delegate->audioQueueUnderflow();
  }
 }
}
 
// this is called by the audio queue when it has finished decoding our data. 
// The buffer is now free to be reused.
void Audio_Queue::audioQueueOutputCallback(void *inClientData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffer)
{
 Audio_Queue *audioQueue = static_cast<Audio_Queue*>(inClientData); 
 unsigned int bufIndex = audioQueue->findQueueBuffer(inBuffer);
 
 assert(audioQueue->m_bufferInUse[bufIndex]);
 
 audioQueue->m_bufferInUse[bufIndex] = false;
 audioQueue->m_buffersUsed--;
 
 if (audioQueue->m_buffersUsed == 0 && !audioQueue->m_queuedHead && audioQueue->m_delegate) {
  audioQueue->m_delegate->audioQueueBuffersEmpty();
 } else if (audioQueue->m_waitingOnBuffer) {
  audioQueue->m_waitingOnBuffer = false;
  audioQueue->enqueueCachedData();
 }
}

void Audio_Queue::audioQueueIsRunningCallback(void *inClientData, AudioQueueRef inAQ, AudioQueuePropertyID inID)
{
 Audio_Queue *audioQueue = static_cast<Audio_Queue*>(inClientData);
 
 AQ_TRACE("%s: enter\n", __PRETTY_FUNCTION__);
 
 UInt32 running;
 UInt32 output = sizeof(running);
 OSStatus err = AudioQueueGetProperty(inAQ, kAudioQueueProperty_IsRunning, &running, &output);
 if (err) {
  AQ_TRACE("%s: error in kAudioQueueProperty_IsRunning\n", __PRETTY_FUNCTION__);
  return;
 }
 if (running) {
  AQ_TRACE("audio queue running!\n");
  audioQueue->setState(RUNNING);
 } else {
  audioQueue->setState(IDLE);
 }
} 
 
} // namespace astreamer

audio_stream.h

/*
 * This file is part of the FreeStreamer project,
 * (C)Copyright 2011-2013 Matias Muhonen.
 * See the file ''LICENSE'' for using the code.
 */

#ifndef ASTREAMER_AUDIO_STREAM_H
#define ASTREAMER_AUDIO_STREAM_H

#import "http_stream.h"
#include "audio_queue.h"

#include <AudioToolbox/AudioToolbox.h>
#include <string>

namespace astreamer {
 
enum Audio_Stream_Error {
 AS_ERR_OPEN = 1,   // Cannot open the audio stream
 AS_ERR_STREAM_PARSE = 2, // Parse error
 AS_ERR_NETWORK = 3  // Network error
};
 
class Audio_Stream_Delegate;
 
class Audio_Stream : public HTTP_Stream_Delegate, public Audio_Queue_Delegate { 
public:
 Audio_Stream_Delegate *m_delegate;
 
 enum State {
  STOPPED,
  BUFFERING,
  PLAYING,
  SEEKING,
  FAILED,
  END_OF_FILE
 };
 
 Audio_Stream();
 virtual ~Audio_Stream();
 
 void open();
 void close();
 void pause();
 
 unsigned timePlayedInSeconds();
 unsigned durationInSeconds();
 void seekToTime(unsigned newSeekTime);
 
 void setUrl(CFURLRef url);
 void setStrictContentTypeChecking(bool strictChecking);
 void setDefaultContentType(std::string& defaultContentType);
 
 State state();
 
 /* Audio_Queue_Delegate */
 void audioQueueStateChanged(Audio_Queue::State state);
 void audioQueueBuffersEmpty();
 void audioQueueOverflow();
 void audioQueueUnderflow();
 void audioQueueInitializationFailed();
 
 /* HTTP_Stream_Delegate */
 void streamIsReadyRead();
 void streamHasBytesAvailable(UInt8 *data, UInt32 numBytes);
 void streamEndEncountered();
 void streamErrorOccurred();
 void streamMetaDataAvailable(std::map<CFStringRef,CFStringRef> metaData);

private:
 
 Audio_Stream(const Audio_Stream&);
 Audio_Stream& operator=(const Audio_Stream&);
 
 bool m_httpStreamRunning;
 bool m_audioStreamParserRunning;
 
 size_t m_contentLength;
 
 State m_state;
 HTTP_Stream *m_httpStream;
 Audio_Queue *m_audioQueue;
 
 AudioFileStreamID m_audioFileStream; // the audio file stream parser
 
 SInt64 m_dataOffset;
 unsigned m_seekTime;
 
 bool m_strictContentTypeChecking;
 std::string m_defaultContentType;
 
 size_t contentLength();
 void closeAndSignalError(int error);
 void setState(State state);
 
 static void propertyValueCallback(void *inClientData, AudioFileStreamID inAudioFileStream, AudioFileStreamPropertyID inPropertyID, UInt32 *ioFlags);
 static void streamDataCallback(void *inClientData, UInt32 inNumberBytes, UInt32 inNumberPackets, const void *inInputData, AudioStreamPacketDescription *inPacketDescriptions);
 
 AudioFileTypeID audioStreamTypeFromContentType(std::string contentType); 
};
 
class Audio_Stream_Delegate {
public:
 virtual void audioStreamStateChanged(Audio_Stream::State state) = 0;
 virtual void audioStreamErrorOccurred(int errorCode) = 0;
 virtual void audioStreamMetaDataAvailable(std::map<CFStringRef,CFStringRef> metaData) = 0;
}; 

} // namespace astreamer

#endif // ASTREAMER_AUDIO_STREAM_H

更多源碼請點擊下載:iOS音樂播放器實現(xiàn)代碼

以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • iOS開發(fā)中WebView的基本使用方法簡介

    iOS開發(fā)中WebView的基本使用方法簡介

    這篇文章主要介紹了iOS開發(fā)中WebView的基本使用方法,代碼基于傳統(tǒng)的Objective-C,需要的朋友可以參考下
    2015-11-11
  • IOS 繪制三角形的實例詳解

    IOS 繪制三角形的實例詳解

    這篇文章主要介紹了IOS 繪制三角形的實例詳解的相關(guān)資料,希望通過本文大家能夠?qū)崿F(xiàn)三角形的繪制,需要的朋友可以參考下
    2017-09-09
  • iOS利用CALayer實現(xiàn)動畫加載的效果

    iOS利用CALayer實現(xiàn)動畫加載的效果

    網(wǎng)上關(guān)于動畫加載的效果大多每一個圓圈都是使用UIView,因為這種容易控制,但是這里用的是CALayer,文中給出了詳細的實現(xiàn)示例代碼,相信會對大家的學(xué)習(xí)和理解很有幫助,感興趣的朋友們下面來一起看看吧。
    2016-10-10
  • IOS 上架后出現(xiàn)90034代碼錯誤問題解決

    IOS 上架后出現(xiàn)90034代碼錯誤問題解決

    這篇文章主要介紹了IOS 上架后出現(xiàn)90034代碼錯誤問題解決的相關(guān)資料,需要的朋友可以參考下
    2016-11-11
  • iOS 點擊圖片放大效果的實現(xiàn)

    iOS 點擊圖片放大效果的實現(xiàn)

    本篇文章主要介紹了iOS 點擊圖片放大效果的實現(xiàn),這種效果一般在微博,微信朋友圈中比較常見,有興趣的可以了解一下。
    2017-01-01
  • iOS逆向開發(fā)之微信自動添加好友功能

    iOS逆向開發(fā)之微信自動添加好友功能

    這篇文章主要介紹了iOS逆向開發(fā)之微信自動添加好友功能,非常不錯,具有一定的參考借鑒價值,需要的朋友可以參考下
    2019-04-04
  • 如何使用IOS自動化測試工具UIAutomation

    如何使用IOS自動化測試工具UIAutomation

    這篇文章主要介紹了UIAutomation使用實例、應(yīng)用技巧、基本知識點總結(jié)和需要注意事項,具有一定的參考價值
    2021-04-04
  • iOS中 UIActionSheet字體的修改

    iOS中 UIActionSheet字體的修改

    這篇文章主要介紹了iOS中 UIActionSheet字體的修改,需要的朋友可以參考下
    2017-06-06
  • iOS編程學(xué)習(xí)中關(guān)于throttle的那些事

    iOS編程學(xué)習(xí)中關(guān)于throttle的那些事

    這篇文章主要給大家介紹了關(guān)于iOS編程學(xué)習(xí)中throttle的那些事,文中通過示例代碼介紹的非常詳細,對各位iOS的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧。
    2017-12-12
  • iOS實現(xiàn)手機獲取驗證碼倒計時效果

    iOS實現(xiàn)手機獲取驗證碼倒計時效果

    這篇文章主要為大家詳細介紹了iOS實現(xiàn)手機獲取驗證碼倒計時效果,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2017-07-07

最新評論

宁安市| 洪泽县| 淮安市| 庆云县| 济南市| 阿克苏市| 潍坊市| 称多县| 莱州市| 白城市| 黔南| 东阳市| 南靖县| 平度市| 天津市| 安西县| 华宁县| 台前县| 阜南县| 通化县| 万载县| 通榆县| 三明市| 湟源县| 固始县| 鄢陵县| 永靖县| 云南省| 石林| 新闻| 威远县| 贡山| 锡林浩特市| 双流县| 育儿| 无棣县| 吴堡县| 原平市| 崇文区| 望江县| 台湾省|