Software-Defined Networking (SDN) has opened a promising and potential approach for future networks, which mostly requires the low-level configuration to implement different controls. With the high advantages of SDN by decomposing the network control plane from the data plane, SDN has become a crucial platform to implement Internet of Things (IoT) services. However, a static SDN controller placement cannot obtain an efficient solution in distributed and dynamic IoT networks. In this paper, we investigate an optimization framework under a well-known theory, namely submodularity optimization, to formulate and address different aspects of the controller placement problem in a distributed network, specifically in an IoT scenario. Concretely, we develop a framework that deals with a series of controller placement problems from basic to complicated use cases. Corresponding to each use case, we provide discussion and a heuristic algorithm based on the submodularity concept. Finally, we present extensive simulations conducted on our framework. The simulation results show that our proposed algorithms can outperform considered baseline methods in terms of execution time, the number of controllers, and network latency.